public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ray Donnelly <mingw.android@gmail.com>
To: cygwin@cygwin.com
Subject: Re: cygwin_conv_path sometimes removes trailing slash
Date: Mon, 01 Feb 2016 10:45:00 -0000	[thread overview]
Message-ID: <CAOYw7dtaqNYHayMeXupTG10VB3DdWXt10A3EroFuPfJVVN69eA@mail.gmail.com> (raw)
In-Reply-To: <loom.20160201T112426-750@post.gmane.org>

On Mon, Feb 1, 2016 at 10:29 AM, Henri <houder@xs4all.nl> wrote:
> Jan Nijtmans <jan.nijtmans <at> gmail.com> writes:
>
>>
>> 2016-01-30 4:21 GMT+01:00 Ken Brown:
>> > I'm using cygwin_conv_path to convert Win32 paths to POSIX paths, and I'm
>> > puzzled by the conversion
>> >
>> >   d:/ --> /cygdrive/d
>> >
>> > without the trailing slash.  By contrast, we have
>> >
>> >   d:/foo/ --> /cygdrive/d/foo/
>>
>> This came up before:
>>    <https://cygwin.com/ml/cygwin/2015-10/msg00048.html>
>> I had to workaround it in tkimg.
>>
>> It's easy to workaround in your program, but - indeed -
>> that shouldn't be necessary. I too would expect that
>> when the input contains a slash, the output should too.
>>
>> Regards,
>>      Jan Nijtmans
>
> For the record ...
>
>  - Ken Brown refers to: win32 -> posix
>  - Jan Nijthuis and Ray Donnelly refer to: posix -> win32
>
> Different code paths ...
>
> (and yes, conversions in both directions should be correct)

I can't check as I'm at work, but to the best of my knowledge (and yes
I wrote these a long time ago) path_conv::check is used in conversions
both ways so I am talking about both cases here, Jan's with the first
patch and Ken's with the second patch. Please do correct me if I am
wrong though! I will run some detailed tests tonight.

Best regards,

Ray.

>
> Regards,
> Henri
>
>
>
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2016-02-01 10:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 20:46 Ken Brown
2016-01-31 22:25 ` Jan Nijtmans
2016-02-01 10:29   ` Henri
2016-02-01 10:38     ` Henri
2016-02-01 10:45     ` Ray Donnelly [this message]
2016-02-01 10:59       ` Henri
     [not found]   ` <CAOYw7ds-N=f+JCn-2rtFqOyahmA_M9mVNwv1CZH6__M-K7ht1A@mail.gmail.com>
2016-02-08 18:13     ` Corinna Vinschen
2016-02-11 16:50       ` Ray Donnelly
2016-02-14 19:08 ` Ken Brown
2016-02-15 15:26   ` Corinna Vinschen

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=CAOYw7dtaqNYHayMeXupTG10VB3DdWXt10A3EroFuPfJVVN69eA@mail.gmail.com \
    --to=mingw.android@gmail.com \
    --cc=cygwin@cygwin.com \
    /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).