OpenJK icon indicating copy to clipboard operation
OpenJK copied to clipboard

fs_game is case sensitive under Linux. Should it be?

Open xycaleth opened this issue 11 years ago • 5 comments

Under Linux, if you load SP or MP with +set fs_game OpenJK, and then again with +set fs_game openjk, two folders will be created in $HOME/.local/share/openjk/ with the names given.

The game should instead only create a single folder, although I'm not sure how we want to name the folder, i.e. do we create the folder with lowercase characters? Or do we create the folder as named, but do a case-insensitive match from then on?

xycaleth avatar Jan 03 '15 15:01 xycaleth

SHould it not be the same as windows for consistency?

OpenJK ? Case sense-match makes sense?

I have confirmed this on Linux (Ubuntu 14.04) too

On 3 January 2015 at 15:22, Alex Lo [email protected] wrote:

Under Linux, if you load SP or MP with +set fs_game OpenJK, and then again with +set fs_game openjk, two folders will be created in $HOME/.local/share/openjk/ with the names given.

The game should instead only create a single folder, although I'm not sure how we want to name the folder, i.e. do we create the folder with lowercase characters? Or do we create the folder as named, but do a case-insensitive match from then on?

— Reply to this email directly or view it on GitHub https://github.com/JACoders/OpenJK/issues/607.

ShahradGH avatar Jan 04 '15 12:01 ShahradGH

As it is right now, its functioning correctly. The directory creation at this stage is OS level. And it's behaving the same as q3.

ensiform avatar Jan 04 '15 14:01 ensiform

Behaving the same as Q3 isn't a reason for or against doing something. JKA is a different game that happens to use the Q3 engine.

Now I think about it, there are reasons not to do it though. Imagine folder name matching already was case insensitive. If the user has manually created two folders called OpenJK and openjk, which folder should the game choose? Both folders are legitimate.

It would be nice to have folder name matching case insensitive, but with the way mod folders are organized, it might not be possible to do this under Linux seeing as it gives us the ambiguous case I mentioned above.

xycaleth avatar Jan 04 '15 14:01 xycaleth

I think case insensitive matching would be really surprising to Linux users. Let's not perpetuate the design mistakes of DOS :grinning:

I think the most sensible solution is to convert the argument of fs_game to lowercase and create the folder with the lowercase name. It is predictable for the user and easy to implement.

sotpapathe avatar May 09 '20 22:05 sotpapathe

Pragmatically, I'd prefer it all to be case sensitive but we can't enforce a lowest common denominator everywhere. I kind of think it should behave as is - it already uses the best-available option per OS/filesystem. I would support force-lowercasing on all OSes - potential issue is any existing mods that are distributed for Linux with non-lowercase directories (small portion but still). This results in the same case described by Xyc above - only one folder would be matched.

Is there a rationale for trying e.g. "MyMod" (from server's fs_game) and then trying "mymod" as backup? Still doesn't solve the issue of mod distributions containing wild-case (server's fs_game "MyMOD" != mod distribution "MyMod" or force-lower "mymod").

We could just say screw compatibility because it's already inconsistent and introducing consistency (force lower-case) would be good. At least there would only be 2 competing standards?

Razish avatar May 24 '20 01:05 Razish