fix(bridge): resolve cliloc file case-insensitively on Linux shards #38

Merged
whitlocktech merged 1 commits from fix/cliloc-case-insensitive-resolve into main 2026-11-25 16:28:34 -06:00
Member

What

Resolve the cliloc file case-insensitively so the bridge's cliloc import works on a Linux/Mono shard whose client ships Cliloc.enu (capital C).

Why

On a case-sensitive filesystem (ext4), Ultima.Files.GetFilePath("cliloc." + lang) probes for exactly the lowercase cliloc.enu and returns null — so BridgeCliloc.ReplyTable emitted the NOT_FOUND "this shard's client has no cliloc.enu" reply even though the file was present and readable by the shard. On Windows (case-insensitive NTFS) it always matched, which is why this only surfaced during the Windows → Linux/Mono migration.

Fix

ResolvePath now falls back to the existing case-insensitive, by-enumeration resolver BridgeUop.FindClientFile when the primary GetFilePath lookup misses. This is the exact treatment the overlay already gives UOP animation packages and assets.sources — see the rationale at BridgeUop.cs ("the gargoyles import on my machine and not on the server"). The cliloc path never got it only because its file is in Ultima.Files' known-file table, so plain GetFilePath was always enough on Windows.

  • Windows is unchanged — the primary GetFilePath still answers first there.
  • No operator action — no renaming the client dir, no restart.
  • Message shape unchanged → no PROTOCOL_VERSION bump. Overlay-only change.

Docs

Companion note in docs/website/CLILOCS.md (RunicGateway/docs#415): states cliloc resolution is case-insensitive on Linux shard hosts.

Testing

Static change in overlay source (no standalone build for this plugin; ServUO compiles it at boot). The fallback reuses the already-proven FindClientFile enumeration verbatim; Windows behaviour is preserved because GetFilePath is tried first and short-circuits on success.

Closes #37

🤖 Generated with Claude Code

https://claude.ai/code/session_014HJEmcaKvWQ8LsnXHKha5y

## What Resolve the cliloc file **case-insensitively** so the bridge's cliloc import works on a Linux/Mono shard whose client ships `Cliloc.enu` (capital C). ## Why On a case-sensitive filesystem (ext4), `Ultima.Files.GetFilePath("cliloc." + lang)` probes for exactly the lowercase `cliloc.enu` and returns `null` — so `BridgeCliloc.ReplyTable` emitted the `NOT_FOUND` *"this shard's client has no cliloc.enu"* reply even though the file was present and readable by the shard. On Windows (case-insensitive NTFS) it always matched, which is why this only surfaced during the Windows → Linux/Mono migration. ## Fix `ResolvePath` now falls back to the existing case-insensitive, by-enumeration resolver `BridgeUop.FindClientFile` when the primary `GetFilePath` lookup misses. This is the exact treatment the overlay already gives UOP animation packages and `assets.sources` — see the rationale at `BridgeUop.cs` (*"the gargoyles import on my machine and not on the server"*). The cliloc path never got it only because its file **is** in `Ultima.Files`' known-file table, so plain `GetFilePath` was always enough on Windows. - **Windows is unchanged** — the primary `GetFilePath` still answers first there. - **No operator action** — no renaming the client dir, no restart. - **Message shape unchanged → no `PROTOCOL_VERSION` bump.** Overlay-only change. ## Docs Companion note in `docs/website/CLILOCS.md` (RunicGateway/docs#415): states cliloc resolution is case-insensitive on Linux shard hosts. ## Testing Static change in overlay source (no standalone build for this plugin; ServUO compiles it at boot). The fallback reuses the already-proven `FindClientFile` enumeration verbatim; Windows behaviour is preserved because `GetFilePath` is tried first and short-circuits on success. Closes #37 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014HJEmcaKvWQ8LsnXHKha5y
wtclaude added 1 commit 2026-11-25 16:24:03 -06:00
Cliloc import over the bridge failed on a Linux/Mono shard whose client
ships `Cliloc.enu` (capital C): `Ultima.Files.GetFilePath` probes for the
exact lowercase `cliloc.enu` and returns null on a case-sensitive
filesystem, so BridgeCliloc replied NOT_FOUND even though the file was
present and readable.

ResolvePath now falls back to the existing case-insensitive, by-enumeration
resolver `BridgeUop.FindClientFile` when the primary lookup misses — the
same treatment the UOP animation packages already got ("the gargoyles
import on my machine and not on the server"). Windows is unchanged
(GetFilePath still answers first); the message shape is unchanged, so no
PROTOCOL_VERSION bump.

Closes #37

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmcaKvWQ8LsnXHKha5y
whitlocktech approved these changes 2026-11-25 16:28:28 -06:00
whitlocktech merged commit 3d71c9ac2d into main 2026-11-25 16:28:34 -06:00
whitlocktech deleted branch fix/cliloc-case-insensitive-resolve 2026-11-25 16:28:34 -06:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/servuo-plugins#38
No description provided.