ronram5126 / steamworkshopdownloader

Simple steam workshop downlaoder
MIT License
21 stars 7 forks source link

Error: if collections has characters that can't be used to name a folder, it gives error #4

Closed Nipodemos closed 4 years ago

Nipodemos commented 4 years ago

Hello!! First i wanna say thank you for doing this code, it will save me tons of time!!!

However i met this issue: The collection has a [ in the name (link: Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update] ), so, because it uses the name of the collection to create the folder, it gives an error, and it is unable to continue

> batchdownload@1.0.0 start C:\Users\Nipodemos\Downloads\steamworkshopdownloader
> node index.js

https://steamcommunity.com/sharedfiles/filedetails/?id=2040151856
Error: ENOENT: no such file or directory, mkdir './downloads/Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]'
    at Object.mkdirSync (fs.js:934:3)
    at C:\Users\Nipodemos\Downloads\steamworkshopdownloader\index.js:40:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async download (C:\Users\Nipodemos\Downloads\steamworkshopdownloader\index.js:28:5) {
  errno: -4058,
  syscall: 'mkdir',
  code: 'ENOENT',
  path: './downloads/Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]'
}

I know a little bit of programming, but i don't know to program in node. Could you see this when you have free time? it would be awesome!

ronram5126 commented 4 years ago

I have uploaded the fix for the file and folder name issue in a new commit. Thanks for you contribution mate. Stay safe.

https://github.com/ronram5126/steamworkshopdownloader/commit/216b7542aad591d98d0a1f1602b2b9f481b01ed1