archiver: warn about MSYS2 path translation, fixes #9339#9348
archiver: warn about MSYS2 path translation, fixes #9339#9348trxvorr wants to merge 1 commit intoborgbackup:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9348 +/- ##
==========================================
- Coverage 83.37% 83.35% -0.02%
==========================================
Files 87 87
Lines 15439 15444 +5
Branches 2309 2310 +1
==========================================
+ Hits 12872 12874 +2
- Misses 1818 1819 +1
- Partials 749 751 +2 ☔ View full report in Codecov by Sentry. |
3c858c2 to
f203dcf
Compare
|
Please update your local master branch and then rebase this branch onto that master and force push. That should solve the CI test failures that are unrelated to your work. |
f203dcf to
50e6d21
Compare
|
btw, if you address feedback by changing the code, maybe give a short answer to the feedback and/or click on "resolve" if you think it is done. |
ThomasWaldmann
left a comment
There was a problem hiding this comment.
one nitpick, rest looks good.
can you add a is_msystem-only test that it does not put the windows paths into an archive?
50e6d21 to
81e1a46
Compare
dfe557a to
2f5b9c9
Compare
This adds a runtime warning when running under MSYS2/Git Bash without the necessary environment variables to disable automatic path translation. The documentation is also updated to explain this behavior and how to mitigate it.
2f5b9c9 to
d7bbcfb
Compare
|
@ThomasWaldmann are the codecov failures fine? |
|
Yes. |
This PR addresses issue #9339 by adding a runtime warning when Borg detects it is running under an MSYS2/Git Bash environment without the necessary configuration to prevent path translation.
In MSYS2 environments, POSIX-style paths (e.g., /tmp) are automatically translated to Windows paths (e.g., C:/msys64/tmp) by the shell before being passed to the application. This causes unintended absolute Windows paths to be stored in archives, reducing portability.
Validated that the warning triggers when running in an unmodified MSYS2 shell.
Validated that setting the environment variables suppresses the warning.