cygpath 3.3.4 : incorrect windows to unix path conversions

Timothee Besset ttimo@ttimo.net
Tue Jun 28 07:44:56 GMT 2022


Hello,

We are seeing some odd behavior from cygpath.exe when it is copied and used
outside the normal cygwin installation directory:

PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
/cygdrive/c

After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:

PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
/

(should be /cygdrive/c!)

After copying those same files to C:\tmp\tmp:

PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
/cygdrive/c

It works again!

We bundle a few cygwin pieces (ssh, rsync) in our application and run them
on machines that may not have cygwin installed, this is why we are trying
to use cygpath outside a normal installation directory - see
https://gitlab.steamos.cloud/devkit/steamos-devkit for details.

We are seeing variations of this, on multiple systems (Windows 10, 11, 2016
datacenter). The paths sometimes get partially translated, like this:

  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\': 0 '/cygdrive/e/\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary': 0 '/cygdrive/e/SteamLibrary\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps': 0 '/cygdrive/e/SteamLibrary/steamapps\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps\\common': 0 '/\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug': 0
'/SteamOSDevkitClient-Debug\n'

We've been using this setup for more than a year and only noticing this
now; I suspect this used to work fine but I couldn't tell you of an older
version that worked for sure.

Cheers,
- TTimo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 19139 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20220628/cb60d8ad/attachment-0001.obj>


More information about the Cygwin mailing list