Comma in file names


#1

Hi!

Does anybod here know, why the JUCE functions File::createLegalPathName and File::createLegalFileName do remove the comma character from the name?
Are there any file systems that have a problem with that character?

Best Regards,
Gregor


#2

https://msdn.microsoft.com/en-us/library/windows/desktop/aa368590(v=vs.85).aspx

Rail


#3

Thanks Rail!

I see, but is it really still necessary today to keep these restrictions of the old 8.3 filenames?
And why does JUCE allow + = [ and ] which were also not allowed in 8.3 filenames but removes the comma and semicolon?

Best Regards,
Gregor


#4

The intention of the method is to use it as a sanity-check for filenames that, for example, a user might type in, or a filename you want to generate based on a random string. So it’s deliberately a bit conservative.

Commas are an example of one of those things where avoiding them is unlikely to cause any actual real problems, but may save you from a subtle bug one day.


#5

Thanks for clarifying!