kal wrote:
wouldnt md5 sum and size of the file be better than name of the file, for uniqueness test.
so you can load bleh.jpg and blah.jpg
but only bleh.jpg is loaded because blah.jpg has the same size and md5 sum
looking this way, it is resource management related
not just case sensitivity
That's an interesting way to look at it - using a md5/hash just makes the file-name problem disappear
However, md5 sums are not cheap - loading times would be much longer if you had to sum the files as you load them (unless you pre-calculate all the MD5's and save them alongside the files, in which case it would be hard to keep them up-to-date)
swiftcoder wrote:
happen to like naming my files in CamelCase, but on case-sensitive hard drives, I would be forced to use all_lower_case.
Yeah, same. Hence the ";P"
Quote:
How do we define a platform that is case-insensetive? Macs are case insensitive if you format the hard drive with that option checked. Linux is case insensitive if you are using an NTFS or FAT32 partition.
Darn... Lets say there's 3 categories: (A)=always case-insensitive, (B)=always case-sensitive, (C)=can be either.
Forcing lower-case paths on-input would make (A) error-free... but obviously breaks (B), and often breaks (C).
Allowing any-case paths is not a problem on (B)... but can cause the obscure resource-duplication bug on (A) and potentially on (C).
It doesn't look like there is a solution.
But as you said -
"The existing behaviour works fine on all platforms - unless you have multiple assets only differentiated by case, which would be plain stupid." - so maybe we should just note this "bug" down as "undefined behaviour", and have the engine be able to issue you with a warning if you ever load two resource files that only differ by upper/lower case.