2 comments

[ 4.1 ms ] story [ 14.3 ms ] thread
Standardising file extensions to lowercase and short forms might be a useful option;

    JPG -> jpg
    jpeg -> jpg
    
I'm not aware of file extensions conventionally presented as mixed case, though ePub might be a possible case.

Does this handle collisions in generated names?

Amen. The Mac goes one level wonkier by allowing file names to visually appear mixed-case, but treats them as if they're upper/lower only one way.

For example, Thing.JPG, thing.jpg, THING.Jpg are all the same file name even though under Linux they would not be.

I didn't look, but does unf check to make sure renaming Spaced Filename.txt to Spaced_Filename.txt check that it isn't clobbering a pre-existing Spaced_Filename.txt and offer a different remediation? Bulk collisions could be very messy.