Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple slashes in album name #6

Closed
toadjaune opened this issue May 4, 2017 · 2 comments
Closed

Support multiple slashes in album name #6

toadjaune opened this issue May 4, 2017 · 2 comments

Comments

@toadjaune
Copy link
Contributor

Hello,

I'm trying to download all my albums, by calling this script on the CLI.

On an album named 26/11/2013, I get the following error :

Processing album: 26-11/2013
fs.js:922
  return binding.mkdir(pathModule._makeLong(path),
                 ^

Error: ENOENT: no such file or directory, mkdir '/home/toadjaune/Pictures/photobox/albums/26-11/2013'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:922:18)
    at Object.downloadPagePhotos (/home/toadjaune/Pictures/photobox/node_modules/photobox-downloader/lib/photobox.js:170:12)
    at /home/toadjaune/Pictures/photobox/node_modules/photobox-downloader/lib/photobox.js:296:20
    at /home/toadjaune/Pictures/photobox/node_modules/async/dist/async.js:3047:20
    at replenish (/home/toadjaune/Pictures/photobox/node_modules/async/dist/async.js:884:21)
    at /home/toadjaune/Pictures/photobox/node_modules/async/dist/async.js:888:13
    at eachLimit$1 (/home/toadjaune/Pictures/photobox/node_modules/async/dist/async.js:3136:26)
    at Object.<anonymous> (/home/toadjaune/Pictures/photobox/node_modules/async/dist/async.js:920:20)
    at /home/toadjaune/Pictures/photobox/node_modules/photobox-downloader/lib/photobox.js:291:17

i can of course make this error disappear by creating the directory albums/26-11.

I guess that at some point in the code, the name is sanitized, by replacing slashes by hyphens, it seems however that only the first slash is replaced.

@RobK
Copy link
Owner

RobK commented May 8, 2017

The issue is here: https://github.com/RobK/photobox-downloader/blob/master/lib/photobox.js#L61 (missing the "g" to make the RegEx global).
Will fix. Thanks for the report.

RobK added a commit that referenced this issue Jul 21, 2017
Support multiple slashes in album name
@RobK
Copy link
Owner

RobK commented Jul 21, 2017

Finally fixed, sorry about the delay!

@RobK RobK closed this as completed Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants