Parenthesis in file/directory name (Linux Mint)

Discuss new features and functions
Posts: 5
Joined: 3 Jan 2023

MintyFresh

I searched and couldn't find this issue addressed, so sorry if it's been discussed.

I'm just starting out with FFS, and my first try got failures due to, apparently, parentheses in some directory names. An example is:

Error Cannot create directory "/media/user/USB-Music/Dire Straits/Alchemy (Live) ".
EINVAL: Invalid argument [mkdir]


I changed the name of this to use a hyphen before "Live", and it then errored on the next one with parenthesis. I have a lot of filenames with parentheses in it, so renaming them all is not an option. Hopefully, it's something simple I can do, as the app looks pretty nice so far.

Any suggestions?
Posts: 5
Joined: 3 Jan 2023

MintyFresh

On further investigation, I found that it was not what it seemed. The destination was a USB drive, and it was formatted exFAT, not ext3 like the normal Linux partitions. So, exFAT does not allow many of the legal Linux characters, and does not allow a period at the end of a file, and perhaps doesn't like trailing spaces, although I have not seen that specified, so it's possibly a bug in FFS.

I had some filenames that had one or more spaces at the end that were not so easy to detect without really looking hard. I think I probably did this by removing some text after the parenthesis, and missed the spaces.

Linux removed the spaces when I copied the file to the USB drive. FFS noticed that the names were different, so it tried to copy over the source files with trailing spaces, but failed to create the directory.

I can't tell if Linux would get an error because it silently removes the trailing spaces. Just like it will silently change an illegal backslash to an underscore on copying.
Posts: 5
Joined: 3 Jan 2023

MintyFresh

FYI: Linux can't copy a file/folder to exFAT ending with a period. It gives an error.There are several illegal characters, but parentheses are not one of them. Most of them are not surprising if you are familiar with Windows; it includes quotes, asterisks, forward and back slash, angle brackets, colon, question mark, and vertical bar.

For pure Linux drives, only the forward slash and null character are illegal.