Page 1 of 1

Regarding file/directory name case

Posted: 14 May 2021, 19:13
by Antsan
Not sure whether this is the right board, but I also wouldn't know where else to ask.

I just wasted a few days installing mods on Linux, and now I noticed that some of the mod installations I tried to do per hand (you know, copying folders into a common mod folder to overwrite files and so on) failed because the mods themselves used inconsistent casing for their folder and file names.
So now I looked for a script to just downcase all files and folders in a given foldertree, found something and am wondering whether normalizing all mods I download that way would lead to any problems. But since OpenMW cannot rely on file name case being consistent, this shouldn't be a problem, right?

Re: Regarding file/directory name case

Posted: 14 May 2021, 20:33
by AnyOldName3
Don't install more than one mod to one directory. This exact situation is one of the main reasons we have the virtual/multiple data directory system in the first place. If you have one mod per directory, provided you've not put OpenMW into strict filesystem mode (which doesn't work with Morrowind anyway), it'll let FILENAME from a high-priority mod override filename from a low-priority mod, just like the mods expect.

Re: Regarding file/directory name case

Posted: 15 May 2021, 21:09
by wazabear
You should just start over and use the multiple data paths or a dedicated mod manager. Here is a pretty thorough overview of all the techniques https://modding-openmw.com/getting-star ... aging-mods. My personal preference, even on linux, is MO2 under wine with the mo2->OpenMW plugin.

You probably have subfolders and files with slightly different cases, there is no sane way to reverse what you've done.

Re: Regarding file/directory name case

Posted: 16 May 2021, 08:22
by Antsan
So you suggest I register the right subdirectories of mods with BAIN installers separately. Wouldn't have thought of doing it that way.
I still keep single mods in their separate directories but I kinda like having all the things that are supposed to be one mod as one coherent unit.

I've already started over. I probably could've salvaged the stuff I'd already done by looking at c-times while normalizing, since I copied everything at least once upon installation, in the correct order for overwriting.
Now I unpack, normalize the resulting directory tree, then overwrite (inside the same mod, not the standard data directory). I feel like keeping all the options for different files, many of which will be overwritten by the same mod, is a waste of space.

Re: Regarding file/directory name case

Posted: 16 May 2021, 15:25
by AnyOldName3
You don't have to have multiple data directories for different parts of the same mod if you don't want to do it that way. It's less likely that that will cause you problems (as a given mod author probably isn't switching case between different versions of the same directory they made), and if it does, it's easier to find and fix them.

Re: Regarding file/directory name case

Posted: 16 May 2021, 22:45
by Antsan
Yeah nah, I only merged directories of the same mod ever and I still got that problem. It's really astonishing how many mod authors seem to switch between different cases for their directory names.
And it's not easier to find and fix them – after the fact it's still not immediately obvious which of two file versions to use. Again, you can check the time the file was last touched on your filesystem, but that's not necessarily easy to figure out if you got a few hundred duplicated files.

I'm using portmod now, though, so it's moot.

Re: Regarding file/directory name case

Posted: 17 May 2021, 20:37
by Mantar
I guess you could run a touch over all the files in the new directory to update their time stamps before merging it in.

Code: Select all

find ./directoryname/ -exec touch {} ;

Re: Regarding file/directory name case

Posted: 18 Jun 2021, 02:20
by Cammera
Different namecase fucks you over even if you use multiple directories, yes.
I recomend running convmv on all data directories.

Code: Select all

convmv --replace -r --lower --notest -f utf8 .
works for me.