Page 1 of 1

Monsters, Inc.

Posted: 27 May 2020, 11:34
by AbedlaPaille
Struggling to understand what happens here. Why is the point an issue in the folder name? And why is it not an issue in the filename? I'm using the same norm on both as well :?:

Re: Monsters, Inc.

Posted: 27 May 2020, 12:13
by rednoah
AFAIK, Windows does not allow file or folder names ending with ".", probably because "." is used for file extensions, and you can't have an empty file extension.

Re: Monsters, Inc.

Posted: 27 May 2020, 12:24
by AbedlaPaille
Oh ok thanks. Can i add to my code this exception and how?

Also folders with extensions? What is windows smoking

Re: Monsters, Inc.

Posted: 27 May 2020, 12:47
by rednoah
Your format. Your rules. {plex} will take care of these things. But if you have your own format, then you need to modify your format to take care of these things.


e.g. the String.validateFileName() method can help with that though:

Code: Select all

"Monsters, Inc.".validateFileName()
// Result: Monsters, Inc

:idea: Treating folder names and file names with the exact same limitations does make sense, consistent and predictable at the very least. ;)