file names, directories and case sensitivity

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: file names, directories and case sensitivity

Post by Sapient »

silene wrote:
Sapient wrote:The code would not even be active on Windows, but on case sensitive OS when a file was not found, so the point whatever it was is meaningless. Also, any add-ons with files or directories differing only by case would be invalid for cross-OS compatibility purposes.
Again, you are missing my point; are you even trying? Let's suppose there is a UMC containing a file with "I" in its name but it is referred with "i" in WML (or the contrary). Then there are some Windows systems where the file won't be found. So we want to detect this kind of issue, and the only way I can imagine is to enforce case sensitivity.
Ok, I misunderstood your point (probably should sleep more and post less). So some Windows regional settings would cause it to behave like a case sensitive operating system when dealing with files originated from another Windows machine. That is really ugly, I agree.

Still, I would rather see a special case-insensitive code that only gets activated when the file reference is not found.

Anything that makes life easier and simpler for content creators is good in my book. Forcing the content creators to go back and change the case of a directory name is not incredibly onerous, I suppose, if they are given the proper information to correct it. If we do go that route, it seems like that should be a warning issued when loading the file rather than simply pretending it didn't find the file and failing to load it though.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: file names, directories and case sensitivity

Post by joshudson »

You could use FILE_FLAG_POSIX_SEMANTICS as option to CreateFile to force case sensitive behavior on Windows. As brutal as that is that will get content authors to do it right.
CHKDSK has repaired bad sectors in CHKDSK.EXE
Post Reply