Skip to content

fix(map-cache): support custom map paths and names#114

Merged
fbraz3 merged 1 commit into
mainfrom
fix/macos-user-custom-maps-loading
Apr 28, 2026
Merged

fix(map-cache): support custom map paths and names#114
fbraz3 merged 1 commit into
mainfrom
fix/macos-user-custom-maps-loading

Conversation

@fbraz3

@fbraz3 fbraz3 commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes custom user map loading on macOS for maps stored under ~/Library/Application Support/GeneralsX/GeneralsZH/Maps, including maps with special characters in folder/file names and maps that rely on local map.str metadata.

What Changed

  • Made map path handling separator-agnostic (\\ and /) in shared map scanning and layout checks.
  • Hardened map display-name extraction for cache/runtime flows to avoid Windows-only path assumptions.
  • Fixed map.str path derivation to use the real map filepath context.
  • Applied matching cache-parse separator hardening in both Zero Hour and Generals INIMapCache.cpp paths.
  • Hardened QuotedPrintable ASCII encoding to use locale-independent ASCII checks for predictable special-character handling.

Files

  • Core/GameEngine/Source/GameClient/MapUtil.cpp
  • GeneralsMD/Code/GameEngine/Source/Common/INI/INIMapCache.cpp
  • Generals/Code/GameEngine/Source/Common/INI/INIMapCache.cpp
  • GeneralsMD/Code/GameEngine/Source/Common/System/QuotedPrintable.cpp
  • Generals/Code/GameEngine/Source/Common/System/QuotedPrintable.cpp

Validation

  • Confirmed custom map load from user path in runtime logs.
  • Stress dataset created with names containing spaces, quotes, punctuation, and accented Unicode; successful runtime execution completed with exit code 0.
  • No diagnostics errors in edited INI/QuotedPrintable files.

Docs

  • Updated docs/DEV_BLOG/2026-04-DIARY.md.
  • Updated docs/WORKDIR/lessons/2026-04-LESSONS.md.

Handle user custom maps on macOS with separator-agnostic map scanning and cache parsing, and harden quoted-printable ASCII handling for special-character map names.\n\nAlso updates April dev blog and lessons learned with the investigation, stress-test notes, and validation details.
@fbraz3 fbraz3 merged commit 098704b into main Apr 28, 2026
10 checks passed
@fbraz3 fbraz3 deleted the fix/macos-user-custom-maps-loading branch April 28, 2026 02:36
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.

1 participant