Sv: Sv: Sv: Sv: Sv: g++ and c++17 filesystem

Eliot Moss
Tue Nov 24 20:39:32 GMT 2020

For the specific case C:\Temp, I found this:

cygpath -ua 'C:\Temp'

   -> /cygdrive/c/Temp

cygpath -ua /cygdrive/c/Temp

   -> /cygdrive/c/Temp

cygpath -ua '\Temp'

   -> /cygdrive/c/Temp

cygpath -ua '/Temp'

   -> /Temp

Now Cygwin is open source, so you, too, could grab the code in cygpath and
call it as a subroutine, maybe, to try to canonicalize a wider range of

Note the interesting difference between the \Temp and /Temp cases.  cygpath
is processing \Temp as a Windows-like thing, and thus interpreting it
according the the Windows root for the current drive.  However, it processes
/Temp and a Posix-like path, which will be in term of the _Cygwin_ root,
generally the CYgwin install directory.

Still, if you did this canonicalization first, maybe you would get more what
you're looking for?  I'm not sure it would be a good idea to insert this
generally into the Cygwin library stack.  Others more familiar with the fine
details can probably elaborate why.

Regards - Eliot Moss

More information about the Cygwin mailing list