case in filenames

Michael Pyne mpyne at kde.org
Thu Apr 28 01:40:13 UTC 2016


On Tue, April 26, 2016 20:11:15 René J.V. Bertin wrote:
> Hi,
> 
> Is there an official guideline concerning the use of case for distinguishing
> between filenames? There are (or have been) a few ports that do this for
> header files (or directories). In that case it's relatively easy to catch
> once you build on a case-insensitive FS like found on OS X (default) or MS
> Windows. But I just realised this might also happen with configuration or
> temporary files/sockets and there it would probably be less evident.

I don't know about "official" but I think any guideline could be simply 
expressed as:

1. Do not accidentally lose information about differences in case (e.g. if 
user does "Save As" as "xSa" then the resulting file name sent to FS should be 
"xSa")

2. Do not rely on file names that differ only in case (e.g. don't install a 
fileA.foo and FileA.foo and expect to be able to open a precise one of those 
two later)

As far as temp file names and things like that, it would be incumbent on the 
code generating such file names to ensure that they don't break guideline 2 
above. Maybe there's more that should be covered but I think that would take 
care of a large portion of any problems.

Regards,
 - Michael Pyne


More information about the Kde-frameworks-devel mailing list