public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: <sten.kristian.ivarsson@gmail.com>
To: <moss@cs.umass.edu>, "'The Cygwin Mailing List'" <cygwin@cygwin.com>
Subject: Sv: Sv: Sv: Sv: Sv: Sv: g++ and c++17 filesystem
Date: Wed, 25 Nov 2020 09:02:10 +0100	[thread overview]
Message-ID: <000b01d6c301$47673ca0$d635b5e0$@gmail.com> (raw)
In-Reply-To: <eba78a62-b702-ffa3-825b-6345e72d575b@cs.umass.edu>

> 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
> paths.

Yeah, thanx for the tip, but this functionality won't be available on other
*nix-platforms, so some kind of #ifdef is required

> 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.

I experimented by fiddling around with making the path canonical and as you
say, maybe we will be more successful and that could still be a part of our
code that is not platform dependant

I guess we need to go out of std::filesystem::canonical though because that
is what fails (and unfortunately I guess there's a real bug in the (real)
g++ distro of <filesystem> because the
std::filesystem::path::generic-functions doesn't work as the standard
mandates either)


Once again, thanx for the tips


Best regards,
Kristian


> Regards - Eliot Moss
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple


  reply	other threads:[~2020-11-25  8:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 15:15 sten.kristian.ivarsson
2020-11-17 16:45 ` René Berber
2020-11-18  9:00   ` Sv: " sten.kristian.ivarsson
2020-11-18 16:24     ` René Berber
2020-11-18 16:31       ` Eliot Moss
2020-11-18 20:46       ` Kristian Ivarsson
2020-11-18 20:56         ` Eliot Moss
2020-11-18 21:18           ` Kristian Ivarsson
2020-11-18 23:47             ` Eliot Moss
2020-11-19  8:10               ` Sv: " sten.kristian.ivarsson
2020-11-18 21:45         ` Norton Allen
2020-11-19  0:08         ` Doug Henderson
2020-11-19  6:23           ` Brian Inglis
2020-11-19 10:03         ` Sv: " sten.kristian.ivarsson
2020-11-19 15:27           ` Brian Inglis
2020-11-20  9:37             ` Sv: " sten.kristian.ivarsson
2020-11-20 15:29               ` Brian Inglis
2020-11-20 16:11                 ` Sv: " sten.kristian.ivarsson
2020-11-19 15:36           ` Eliot Moss
2020-11-20  8:31             ` Sv: " sten.kristian.ivarsson
2020-11-20 18:28               ` Jonathan Yong
     [not found]                 ` <000601d6c173$aa55d540$ff017fc0$@gmail.com>
2020-11-23 11:09                   ` Sv: " Jonathan Yong
2020-11-24  9:32                     ` Sv: " sten.kristian.ivarsson
2020-11-24 10:24                       ` Jonathan Yong
2020-11-24 11:35                         ` Sv: " sten.kristian.ivarsson
2020-11-24 12:33                           ` Jonathan Yong
2020-11-24 14:01                             ` Sv: " sten.kristian.ivarsson
2020-11-25  2:25                               ` Jonathan Yong
2020-11-24 13:22                       ` Eliot Moss
2020-11-24 14:31                         ` Sv: " sten.kristian.ivarsson
2020-11-24 20:06                           ` Ken Brown
2020-11-24 20:39                             ` Eliot Moss
2020-11-25  8:02                               ` sten.kristian.ivarsson [this message]
2020-11-25  8:30                             ` Sv: " sten.kristian.ivarsson
2020-11-25  0:23                           ` Brian Inglis
2020-11-25  9:00                             ` Sv: " sten.kristian.ivarsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000b01d6c301$47673ca0$d635b5e0$@gmail.com' \
    --to=sten.kristian.ivarsson@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=moss@cs.umass.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).