Is this a portable way to escape MSYS2's Linux pathes?
0
votes
0
answers
31
views
MSYS2-built Linux applications internally rewrite Linux pathes to Windows pathes.
This can be problematic if those are supposed to interface with other, proper-Linux applications (e.g. in my case, MSYS2 rsync connecting to a Debian 12 rsync server).
It can be configured but neither are the means particularly elegant nor are they particularly dependable , it would seem.
There is however a very appealing shorthand : Use an absolute path prefixed with a second
/
.
e.g. /home/me/something
will become C:\msys64\home\me\something
but //home/me/something
will remain unchanged (and the rsync server treats it as single /
at least on Debian 10 and 12).
I am using MSYS2 to make a single Windows machine work mostly-seamlessly in an environment otherwise dominated by Debian 12 machines, wanting to use the same tools/scripts there, if possible, so I wonder:
**Can I presume a path beginning with //
equals a path starting with /
on all or most Linux distributions / for all or most common CLI tools?**
As per the Unix standard , interpretation of the first slash in //
is implementation-defined. But what do the implementations define?
(This question deals with the native Linux side, but if you just happen to know whether this is a stable solution on the MSYS2 side, I would be grateful for mentioning it.)
Asked by Zsar
(111 rep)
Jan 21, 2025, 04:30 PM
Last activity: Jan 21, 2025, 05:25 PM
Last activity: Jan 21, 2025, 05:25 PM