Skip to content

resolve all paths before expressing target relative to root#342

Merged
mathieudpnt merged 3 commits intoProject-OSmOSE:mainfrom
Gautzilla:fix-absolute-to-relative-resolve
Feb 18, 2026
Merged

resolve all paths before expressing target relative to root#342
mathieudpnt merged 3 commits intoProject-OSmOSE:mainfrom
Gautzilla:fix-absolute-to-relative-resolve

Conversation

@Gautzilla
Copy link
Contributor

@Gautzilla Gautzilla commented Feb 18, 2026

There was a bug where the absolute_to_relative() helper function didn't work with symlinks:

absolute_to_relative(
target_path = r"//ensieta.ecole/recherche/acoustock",
root_path = r"L:/acoustock"
)

where L is a symlink for //ensieta.ecole/recherche.

This raised the following error:

ValueError: path is on mount '\\\\ensieta.ecole\\recherche', start on mount 'L:'

This PR solves the error, and correctly returns the relative path despite symlinks.

image

@Gautzilla Gautzilla self-assigned this Feb 18, 2026
@Gautzilla Gautzilla added the bug Something isn't working label Feb 18, 2026
@mathieudpnt mathieudpnt merged commit 1d3ab03 into Project-OSmOSE:main Feb 18, 2026
1 check passed
@Gautzilla Gautzilla deleted the fix-absolute-to-relative-resolve branch February 20, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments