Capitalization in filenames, and how it affects linux
Posted: 14 May 2018, 22:47
(I made a thread tangentially related to this several months ago, but now it'd be refloating dead threads and, from my last experience in forums, that's not well liked at all.) I am making the this post here because I am not sure of which other subforum is more apropriate.
This is an issue that affects unix systems, because of the way it deals with capitalization in filenames (Namely, it doesn't) and how this interacts with having multiple data folders. It tripped me up something fierce until I found out the issue exactly; aaa.nif may be in the last folder specified, but aAA.NIF, even thought it's in the first one, is loaded because it's the first file the engine finds, due to how sorting by filename works.
My solution was using convmv, a command line program, to uncapitalize all filenames in my data folders, but this isn't something that new users may be aware of, so I wanted to discuss how to solve it optimally. One solution could be to make OMW's virtual filesystem uncapitalize names automatically (or, unlike unix system, recognize capitalized and uncapitalized characters as the same) but this might add overhead on every single launch. Another one, thought it'd take more work on the user's end or editing the launcher, would be to make convmv's one of OMW's dependencies and add a note about this issue in the launcher, in the active ESPs tab. I thought about adding this note to the wiki, but that may not be as visible to new users.
Or if one wanted to go crazy, just add a button to uncapitalize all names with convmv there. This could be moved to the data folders tab when it's added to the launcher itself, also making convmv only uncapitalize newly added folders to save time.
As a last note I am perfectly aware adding more dependencies to a program in linux isn't usually done willy nilly, and that it may be tempting to just bound a script with OMW that does this instead, but keep in mind that a script will be way, way slower at the work than a proper program for it like convmv is.
This is an issue that affects unix systems, because of the way it deals with capitalization in filenames (Namely, it doesn't) and how this interacts with having multiple data folders. It tripped me up something fierce until I found out the issue exactly; aaa.nif may be in the last folder specified, but aAA.NIF, even thought it's in the first one, is loaded because it's the first file the engine finds, due to how sorting by filename works.
My solution was using convmv, a command line program, to uncapitalize all filenames in my data folders, but this isn't something that new users may be aware of, so I wanted to discuss how to solve it optimally. One solution could be to make OMW's virtual filesystem uncapitalize names automatically (or, unlike unix system, recognize capitalized and uncapitalized characters as the same) but this might add overhead on every single launch. Another one, thought it'd take more work on the user's end or editing the launcher, would be to make convmv's one of OMW's dependencies and add a note about this issue in the launcher, in the active ESPs tab. I thought about adding this note to the wiki, but that may not be as visible to new users.
Or if one wanted to go crazy, just add a button to uncapitalize all names with convmv there. This could be moved to the data folders tab when it's added to the launcher itself, also making convmv only uncapitalize newly added folders to save time.
As a last note I am perfectly aware adding more dependencies to a program in linux isn't usually done willy nilly, and that it may be tempting to just bound a script with OMW that does this instead, but keep in mind that a script will be way, way slower at the work than a proper program for it like convmv is.