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

Adding a folder containing special char to the library does not work #377

Open
vprigent opened this issue Jan 17, 2018 · 10 comments
Open

Adding a folder containing special char to the library does not work #377

vprigent opened this issue Jan 17, 2018 · 10 comments

Comments

@vprigent
Copy link
Contributor

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.

@vprigent
Copy link
Contributor Author

vprigent commented Jan 17, 2018

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.

@martpie
Copy link
Owner

martpie commented Jan 17, 2018

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.

@martpie
Copy link
Owner

martpie commented Feb 6, 2018

So I've just tried to import a folder called ~/Documents/temp/Asa}/ and everything went well. Can you specify your OS?

@vprigent
Copy link
Contributor Author

vprigent commented Feb 6, 2018

Woops, I was talking about the square brackets ( [] )

I just tried with the curly ones and it works well

@a2nt
Copy link

a2nt commented Feb 9, 2018

@KeitIG try "â ãåðìàíèè" file names sometimes it happens when u have used file categorizing by tags software with wrong tags encoding.

@martpie
Copy link
Owner

martpie commented Apr 3, 2018

I just tried again with a ] or files with special accents, and it works (on macOS), I'll try on Ubuntu.

@martpie martpie added the bug label Apr 3, 2018
@martpie martpie added the linux label Aug 19, 2018
@martpie
Copy link
Owner

martpie commented Sep 6, 2018

@vprigent Can you reproduce this bug with 0.10?

@vprigent
Copy link
Contributor Author

vprigent commented Sep 7, 2018

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

@martpie
Copy link
Owner

martpie commented Mar 3, 2019

Reproducible, blocker for 0.11.

On it right now.

@martpie
Copy link
Owner

martpie commented Mar 3, 2019

I fixed the infinite loading, but I cannot fix the search not happening in those folders yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants