Quote:
Originally Posted by KevinH
FWIW, using the file extension helps prevent name collisions but I really hate seeing the "." as part of an identifier. I think it would be better to split off the extension and then add it back to the end of the filename prepended with an underscore and not a period.
So Cover.jpg as an id would become Cover_jpg
|
Because spaces (and possibly other characters) in the filename are already converted to underscores, it's possible that unique filenames could—in theory—create non-unique IDs. Depending on what characters currently get replaced with underscores, you could get a collision. In particular, if you globally replace periods with underscores (and not just the extension separator), then a very common naming scheme will cause collisons:
Code:
A.Long.Filename.jpeg
A Long Filename.jpeg
So, other than being mindful of ID collision, I agree that converting the period would be a good idea.