Conversation
7fb08ab to
8723ea3
Compare
8723ea3 to
719001c
Compare
719001c to
9a69940
Compare
9a69940 to
3767abf
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. WalkthroughPath utilities now provide shared separator and filename handling. Map-transfer helpers use these utilities to build companion paths, and save-game map-path parsing recognizes both slash types. ChangesMap path handling
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to Saves with an empty description and a forward-slash map path can show the full path instead of the map filename. This is a limited save-list display issue; the PR is otherwise mergeable with this correction noted. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The current pull request adds unrelated map parsing changes in Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 30171078-daf4-4191-a1f2-58a879ab62b0
📒 Files selected for processing (5)
Core/GameEngine/Include/Common/FileSystem.hCore/GameEngine/Include/GameNetwork/FileTransfer.hCore/GameEngine/Source/Common/System/FileSystem.cppCore/GameEngine/Source/GameNetwork/FileTransfer.cppCore/Libraries/Include/Lib/PathUtil.h
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Apply separator-aware parsing to fallback map labels. · GameState.cpp:1669
Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp:1669
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winApply separator-aware parsing to fallback map labels.
Both implementations now accept
/map paths but still search only for\when the map has no label. A save with an empty description can therefore display the full map path instead of the filename. (raw.githubusercontent.com)
Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp#L1669-L1669: usegetMapLeafNameto set the fallback label.GeneralsMD/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp#L1669-L1669: usegetMapLeafNameto set the fallback label.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 134fc0bd-3ee2-47a2-b598-cd66c63ef7b0
📒 Files selected for processing (2)
Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cppGeneralsMD/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Map transfer paths only recognized backslashes, so paths using
/produced incorrect preview and companion-file names.
Now both separators are recognized and companion files keep the map's
directory.
Todo:
Note
Handle both '/' and '' as path separators in map path lookups
FileTransfer(e.g.GetBasePathFromPath,GetFileFromPath,GetINIFromMap) previously searched only for backslashes; they now use newPathUtilhelpers (getLastPathSeparator,getFileName,isPathSeparator) that accept both separatorsPathUtil.isNativePathSeparatorandgetNativePathSeparator, and a newFileSystem.appendPathSeparatorhelper in FileSystem.cppFileTransfer.GetFileInMapDirectoryreuses the input path's own separator instead of hardcoding a backslashGameState.getMapLeafNameandGameState.getMapLeafAndDirNamein GameState.cpp and GameState.cpp now extract map leaf names after either separatorPathUtil.isPathSeparatornow accepts both separators on every platform, and map sibling paths (.ini,.str,.tgapreview, etc.) keep the input path's separator form rather than a hardcoded backslash; severalFileTransfergetters now take path parameters by const referenceMacroscope summarized 3e76237.