Skip to content

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

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

bobtista wants to merge 2 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 3 times, most recently 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 →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Map-cache path construction, map discovery, and fallback display-name extraction now use shared path helpers. Archive listings also use the filesystem separator helper when constructing directory and file paths.

Changes

Cross-platform path handling

Layer / File(s) Summary
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 builds cache paths with the filesystem separator helper. Map discovery handles either supported path separator, and fallback display names use getFileName.
Archive listing path separators
Core/GameEngine/Source/Common/System/ArchiveFile.cpp
Archive directory and listed-file paths use FileSystem::appendPathSeparator.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: xezon

Merge Risk: Minimal · previous review b9f6e

The reviewed path changes introduce no established merge-blocking issue; the traced map and archive paths remain compatible.

Architecture risk: Low · up to b9f6e

The change affects 1 system.

Changed systems: Core

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Core (service) was modified; 4 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in Core/GameEngine/Include/GameClient/MapUtil.h: MapCache adds a private static getCachePath(const AsciiString &mapDir) declaration returning AsciiString.
  • observed — Modified behavior in Core/GameEngine/Source/GameClient/MapUtil.cpp: Adds the PathUtil include used by the path handling changes.
  • observed — Modified behavior in Core/GameEngine/Source/GameClient/MapUtil.cpp: Adds MapCache::getCachePath, which appends the filesystem’s platform-aware path separator to a map directory before adding the cache filename.
  • observed — Modified behavior in Core/GameEngine/Source/GameClient/MapUtil.cpp: writeCacheINI now gets its output path from getCachePath instead of manually appending a backslash and then the cache filename.
🚥 Pre-merge checks | ✅ 4

✅ Passed checks (4 passed)

Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing map cache paths on non-Windows platforms.
Description check ✅ Passed The description directly explains the non-Windows cache path issue, the separator changes, and the related display-name handling.
Linked Issues check ✅ Passed The changes satisfy issue #3101. MapCache::getCachePath now uses the platform-aware separator for cache reads and writes. Map-directory enumeration uses the same separator. Non-Windows builds theref…
Out of Scope Changes check ✅ Passed The changes stay within issue #3101. The path-separator updates support cache placement and map discovery. The fallback-name updates support cached map handling for paths with either separator. No unr…
ℹ️ Recent review info

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 799e530e-d083-4e16-9eba-6c80ff4d8239

📥 Commits

Reviewing files that changed from the base of the PR and between 660f91bf0221bf65c334eea157a30300026add6b and b9f6e17ddbd54e3928fe3a100bddd303d3809a3c.

📒 Files selected for processing (2)

  • Core/GameEngine/Source/Common/INI/INIMapCache.cpp
  • Core/GameEngine/Source/Common/System/ArchiveFile.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 660f91b to b9f6e17 Compare September 30, 2026 22:06
@mirelle7

mirelle7 commented Oct 9, 2026 •

Copy link
Copy Markdown

Seems correct. Have confirmed the bug on another platform.
Asked 5 questions to Claude and no negatives.

LGTM

@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from b9f6e17 to 3791ec7 Compare October 17, 2026 20:00
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 3791ec7 to 9968e55 Compare October 28, 2026 18:11
@bobtista
bobtista force-pushed the bobtista/bugfix/map-cache-separator branch from 9968e55 to be24094 Compare November 5, 2026 16:52
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

2 participants