Open vprigent opened 6 years ago
A simple solution would be to add some escaping like this
const pattern = path.join(RegExp.escape_path(folder, '**/*.*');
Beware that many of the solutions for escaping regex implies escaping the /
as well and that it prevents globby from doing anything as the path won't be valid anymore.
You can try, add some brackets, hooks or some special characters to a folder, try to import it and your folder won't import.
I did not even know those were valid characters for folders. Will definitely need to have a look into it.
So I've just tried to import a folder called ~/Documents/temp/Asa}/
and everything went well. Can you specify your OS?
Woops, I was talking about the square brackets ( [] )
I just tried with the curly ones and it works well
@KeitIG try "â ãåðìà Ãèè" file names sometimes it happens when u have used file categorizing by tags software with wrong tags encoding.
I just tried again with a ]
or files with special accents, and it works (on macOS), I'll try on Ubuntu.
@vprigent Can you reproduce this bug with 0.10?
I just tried using the first music folder I could find with special chars,
[Indie Rock] The Kooks - Listen [Deluxe Edition] 2014 (Jamal The Moroccan)
Does hang on import. I have imported the Music folder containing folders with specific chars as the one above, files from these folders are correctly being imported.
I'll try again on Linux tonight, these are for Museeks 0.10 on macOS Sierra
EDIT > Same issue on Ubuntu 18.04
Reproducible, blocker for 0.11.
On it right now.
I fixed the infinite loading, but I cannot fix the search not happening in those folders yet.
When trying to add a specific new album (understand folder here ) to my library I noticed that nothing happened.
This is due to the name of the folder I jumped into Museeks to contain special regex chars. https://github.com/KeitIG/museeks/blob/master/src/ui/actions/LibraryActions.js#L115-L116
You can try, add some brackets, hooks or some special characters to a folder, try to import it and your folder won't import.