Monsters, Inc.

Any questions? Need some help?
Post Reply
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Monsters, Inc.

Post 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 :?:
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Monsters, Inc.

Post 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.
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: Monsters, Inc.

Post by AbedlaPaille »

Oh ok thanks. Can i add to my code this exception and how?

Also folders with extensions? What is windows smoking
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Monsters, Inc.

Post 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. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply