Skip to content

Store session paths relative to the session file - #581

Merged
JanuszBedkowski merged 3 commits into
MapsHD:mainfrom
capCafu:relative-session-paths
Oct 25, 2026
Merged

JanuszBedkowski merged 3 commits into
MapsHD:mainfrom
capCafu:relative-session-paths

Conversation

@capCafu

@capCafu capCafu commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Closes #558, closes #579.

Session files now store paths relative to the session file's folder, so a session
keeps working after its folder is moved or copied to another computer. Old sessions
with absolute paths load as before.

  • Add toSessionPath() / resolveSessionPath() in shared/include/HDMapping/SessionPaths.h, with tests
  • Use them to resolve paths in Session::load and the trajectory viewer
  • Write relative paths in Session::save and step 1's session.mjs

Tested on Linux: full build and ctest pass. A session saved one folder above its data,
then moved, fails to load on main and loads with this change. Step 2 --export works
on a moved session.

@JanuszBedkowski
JanuszBedkowski merged commit 92ac497 into MapsHD:main Oct 25, 2026
7 checks passed
@capCafu
capCafu deleted the relative-session-paths branch October 25, 2026 06:30
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.

make paths local in session file save session elements as local path not global

2 participants