museeks icon indicating copy to clipboard operation
museeks copied to clipboard

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

Open vprigent opened this issue 7 years ago • 10 comments

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 avatar Jan 17 '18 09:01 vprigent

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.

vprigent avatar Jan 17 '18 09:01 vprigent

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 avatar Jan 17 '18 09:01 martpie

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

martpie avatar Feb 06 '18 13:02 martpie

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

I just tried with the curly ones and it works well

vprigent avatar Feb 06 '18 20:02 vprigent

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

a2nt avatar Feb 09 '18 06:02 a2nt

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

martpie avatar Apr 03 '18 07:04 martpie

@vprigent Can you reproduce this bug with 0.10?

martpie avatar Sep 06 '18 15:09 martpie

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

vprigent avatar Sep 07 '18 04:09 vprigent

Reproducible, blocker for 0.11.

On it right now.

martpie avatar Mar 03 '19 10:03 martpie

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

  • https://github.com/sindresorhus/globby/issues/81
  • https://github.com/mrmlnc/fast-glob/issues/158

martpie avatar Mar 03 '19 12:03 martpie