fixpath not properly converting Unix paths with print?
Julian Waters
tanksherman27 at gmail.com
Thu Oct 20 13:59:50 UTC 2022
Yep, just tried the same thing on MSYS, worked like a charm
(Path to fixpath was truncated for easier reading)
$ fixpath print /usr/bin/make
C:\msys64\usr\bin\make
This is going to be pretty frustrating, but I'll take a crack at it to see
if I can wrestle WSL into fixpath, thanks for the link
best regards,
Julian
On Thu, Oct 20, 2022 at 5:27 PM Daniel Jeliński <djelinski1 at gmail.com>
wrote:
> Hi,
> Fixpath does not work with WSL paths; historically it was hard to map them
> to Windows paths.
>
> This article suggests that it should be easier now:
>
> https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/
>
> I suppose you could give it a try if you're interested.
> Regards,
> Daniel
>
>
> czw., 20 paź 2022 o 10:59 Julian Waters <tanksherman27 at gmail.com>
> napisał(a):
>
>> 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/f5323b8a/attachment.htm>
More information about the build-dev
mailing list