Skip to content

bugfix(map): Fix map cache paths on non-Windows - #3107

Draft
bobtista wants to merge 8 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/map-cache-separator
Draft

bobtista wants to merge 8 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/map-cache-separator

Conversation

@bobtista

@bobtista bobtista commented Aug 11, 2026 •

Copy link
Copy Markdown

Map cache paths use backslashes, so non-Windows builds write the cache
outside the Maps directory.

Now cache reads, writes and map scans use the native separator.
Cached maps without a localized name also handle either separator
when building their display name.

Todo:

  • Cache is written in the Maps directory
  • Custom maps without localized names show their display name

@bobtista bobtista self-assigned this Aug 11, 2026
@bobtista bobtista added the Platform Work towards platform support, such as Linux, MacOS label Aug 11, 2026
@bobtista
bobtista marked this pull request as draft August 11, 2026 15:51
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from c92a408 to 242bf48 Compare August 14, 2026 12:00
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 242bf48 to 528f883 Compare August 27, 2026 16:30
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 528f883 to f7a6041 Compare September 11, 2026 17:32
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from f7a6041 to ad527f6 Compare September 14, 2026 21:06
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from ad527f6 to 1e12672 Compare September 14, 2026 21:30
@bobtista bobtista changed the title bugfix(map): Write and scan the map cache with the platform separator bugfix(map): Fix map cache paths on non-Windows Sep 14, 2026
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 1e12672 to fda6dd2 Compare September 14, 2026 23:20
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 563d3927-37c7-4ed2-b092-1fa4b040d2f5

📥 Commits

Reviewing files that changed from the base of the PR and between bfa3bbf and 660f91b.

📒 Files selected for processing (7)
  • Core/GameEngine/Include/Common/FileSystem.h
  • Core/GameEngine/Include/GameClient/MapUtil.h
  • Core/GameEngine/Source/Common/INI/INIMapCache.cpp
  • Core/GameEngine/Source/Common/System/ArchiveFile.cpp
  • Core/GameEngine/Source/Common/System/FileSystem.cpp
  • Core/GameEngine/Source/GameClient/MapUtil.cpp
  • Core/Libraries/Include/Lib/PathUtil.h

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

Path utilities and filesystem path construction now use native separators. Map-cache paths and filename extraction support both slash forms. The map-cache change addresses a non-Windows issue where the cache file was written to a path containing a literal backslash.

Changes

Cross-platform path handling

Layer / File(s) Summary
Path separator semantics and filename helpers
Core/Libraries/Include/Lib/PathUtil.h
PathUtil distinguishes host-native separators from separators accepted in paths. It adds helpers to find the last separator and extract a filename.
Native separator appending and filesystem paths
Core/GameEngine/Include/Common/FileSystem.h, Core/GameEngine/Source/Common/System/FileSystem.cpp, Core/GameEngine/Source/Common/System/ArchiveFile.cpp
FileSystem adds a helper to append the native separator to nonempty paths. ArchiveFile uses it for directory and file paths. The directory-prefix check uses the native separator.
Map cache paths and filename fallbacks
Core/GameEngine/Include/GameClient/MapUtil.h, Core/GameEngine/Source/GameClient/MapUtil.cpp, Core/GameEngine/Source/Common/INI/INIMapCache.cpp
MapCache uses shared helpers to build cache paths, discover map filenames, and form fallback display names. INIMapCache uses the filename helper for its fallback name.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 660f9

The inspected cache, archive, and filesystem paths show no material user-facing failure from these changes. No merge-blocking risk is established; the change is ready for normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy the coding requirement in issue #3101. MapCache::getCachePath now uses the native separator for cache reads and writes, so non-Windows builds target MapCache.ini in the user ma…
Out of Scope Changes check ✅ Passed The changes stay within issue #3101. The new path-separator helpers support the cache-path fix. The archive directory-listing change supports map discovery. The fallback-name changes support cached ma…
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing map cache paths on non-Windows platforms.
Description check ✅ Passed The description directly explains the non-Windows cache-path bug, the native-separator fix, and fallback display-name handling.

Comment @coderabbitai help to get the list of available commands.

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

Labels

Platform Work towards platform support, such as Linux, MacOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Map cache is not written on non-Windows builds

1 participant