fixpath not properly converting Unix paths with print?
Julian Waters
tanksherman27 at gmail.com
Thu Oct 20 08:58:46 UTC 2022
Hi all,
On Windows MakeBase contains a utility to extract Windows paths from Unix
style paths:
# FixPath
#
# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
# "mixed mode" (e.g. c:/cygwin/bin/foo). On other platforms, return the path
# unchanged.
# This also converts a colon-separated list of paths to a
semicolon-separated
# list.
# This is normally not needed since we use the FIXPATH prefix for command
lines,
# but might be needed in certain circumstances.
According to the documentation it should be able to handle paths like
/usr/bin or /bin/xxx, but manually invoking the implementation of this
utility from the shell seems to indicate that it can only properly convert
full paths that have environment prefixes and so on, with the "true" Unix
style paths simply expanding into empty strings:
Working usage:
user at LAPTOP-NEMLU0S6:/mnt/d/eclipse/workspace/hotspot/jdk$ fixpath print
/mnt/c/progra~1/mib055~1/2022/commun~1/vc/tools/msvc/1432~1.313/bin/hostx64/x64/cl.exe
c:\progra~1\mib055~1\2022\commun~1\vc\tools\msvc\1432~1.313\bin\hostx64\x64\cl.exe
user at LAPTOP-NEMLU0S6:/mnt/d/eclipse/workspace/hotspot/jdk$
as compared to:
user at LAPTOP-NEMLU0S6:/mnt/d/eclipse/workspace/hotspot/jdk$
/mnt/d/eclipse/workspace/hotspot/jdk/build/windows-x86_64-server-release/fixpath
print /usr/bin/make
vertig0 at LAPTOP-NEMLU0S6:/mnt/d/eclipse/workspace/hotspot/jdk$
I can't quite tell if this is a subtle bug or if it's working as intended,
and the documentation is just a tad outdated/was misinterpreted by me, so I
thought I'd raise it on the list just in case (I first caught this while
using FixPath on a local branch).
best regards,
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20221020/922795ca/attachment.htm>
More information about the build-dev
mailing list