Cliloc lookup is case-sensitive on Linux — bridge import fails on a Mono shard shipping Cliloc.enu #37
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On a Linux shard running under Mono, the cliloc import over the bridge fails with:
even though the client's cliloc file is present and readable by the shard. The cause
is a case-sensitive file lookup: the client ships
Cliloc.enu(capital C), butBridgeClilocresolves it as the all-lowercasecliloc.enu. On Windows (NTFS,case-insensitive) that matched; on a case-sensitive filesystem (ext4) it does not.
Root cause
BridgeCliloc.ResolvePathresolves the file throughUltima.Files.GetFilePathwith afixed lowercase name:
overlay/Scripts/Custom/Bridge/BridgeCliloc.cs:237-251—ResolvePath(lang)returnsFiles.GetFilePath("cliloc." + lang)(i.e.cliloc.enu).Ultima.Filesprobes for exactlycliloc.enu; the real file isCliloc.enu,so
GetFilePathreturnsnull.BridgeCliloc.cs:167-173then emits theNOT_FOUND"has no cliloc.<lang>" reply.This is the same class of bug the overlay already solved for UOP animation packages — see
the rationale comment at
overlay/Scripts/Custom/Bridge/BridgeUop.cs:117-121("the gargoyles import on my machine and not on the server") and the case-insensitive
resolver
BridgeUop.FindClientFile(BridgeUop.cs:143). The cliloc path just never gotthat treatment because its file is in
Ultima.Files' known-file table, so on Windowsplain
GetFilePathwas always enough.Evidence (live Linux/Mono shard)
The rest of the copied client directory is mixed-case as well (e.g.
INTLOC02.ENU,Intloc01.enu,intloc00.enu), i.e. a Windows client tree copied onto Linux with itsoriginal casing intact — so this will bite any other
Ultima.Files-resolved read too.Proposed fix
In
ResolvePath, whenFiles.GetFilePath("cliloc." + lang)returnsnull, fall back tothe existing case-insensitive
BridgeUop.FindClientFile("cliloc." + lang), which alreadyenumerates ServUO's data directories (
Files.RootDir+Core.DataDirectories) and matchesfile names with
StringComparison.OrdinalIgnoreCase. This mirrors the UOP /assets.sourcespattern, requires no operator action, and leaves the Windows path unchanged (the primary
GetFilePathstill answers first there).PROTOCOL_VERSIONbump; overlay-only change.docs/website/CLILOCS.mdthat cliloc resolution is case-insensitive(Linux shard hosts ship
Cliloc.enu; the site usually runs on case-sensitive filesystems).Operator workaround (until the fix ships)
On the shard host, lowercase the cliloc file (or the whole client dir) so the current
lookup matches:
Found during the UO shard's Windows -> Linux/Mono migration.