Skip to content

fix: use case-insensitive path lookup in MemMapFs on Windows#616

Open
leno23 wants to merge 1 commit into
spf13:masterfrom
leno23:fix/memmapfs-case-insensitive-windows
Open

fix: use case-insensitive path lookup in MemMapFs on Windows#616
leno23 wants to merge 1 commit into
spf13:masterfrom
leno23:fix/memmapfs-case-insensitive-windows

Conversation

@leno23

@leno23 leno23 commented May 25, 2026

Copy link
Copy Markdown

Summary

  • MemMapFs used exact-case map keys for path lookup, which breaks Windows-style paths where casing may differ between create and stat/open calls
  • Add a shared lookup helper that falls back to strings.EqualFold on Windows while preserving case-sensitive behavior elsewhere

Test plan

  • Added TestMemMapFsCaseInsensitiveLookup (Windows vs non-Windows behavior)
  • go test ./...

Fixes #126

MemMapFs stored paths as map keys with exact case, so Stat/Open failed
on Windows when callers used different casing than the stored path.
Look up existing entries with strings.EqualFold on Windows only.

Fixes spf13#126
@CLAassistant

CLAassistant commented May 25, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@leno23 leno23 force-pushed the fix/memmapfs-case-insensitive-windows branch from 8241fc5 to daeab2c Compare May 26, 2026 04:41
@spf13

spf13 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Thanks for these contributions. Before we can review and merge, you'll need to sign the Contributor License Agreement (CLA). Please do so and then let us know — we'll pick up the review from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stat call when using Memory FS is case sensitive on Windows

3 participants