X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=LJ 0AKkg+me7zdB9wMIrSjqB1Eo5Nt49cjIRqGe9OpVQX1IxIoezM1FhIH8CVUxqP4Z 4bWMkZT+GGlmt/IPMIvIrSwQakRZz2MiNR2KU4DzFRi5mOaZG2wVAwPusGi7Jm5p k062FlcnML7FwZL72Yg+rCOpGTW6B+aWtE6s4HbyM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=fG0rdyIt sep6PPEPnrf1soHanpk=; b=ZRek4CUvCLirf11seEvXH8rjRpSK9fTuo+6133+r Q4sDJnFRdEji0IO2g2miPPJtJRzKUV2aBWjEIXqGbsau3DH6xafY4kiWdxGnRIUM egvfmm3GbRBLHj6okoGhTqHgOBVmRDAJj/4yoxGiQ/jSDNymA+EGdq6ru23XDOHs ynY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Ray, jan DOT nijtmans AT gmail DOT com, jannijtmansgmailcom, H*f:sk:JCn-2rt X-HELO: mail-lf0-f47.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=H914TnLTS1DccQuI69PYi9U/b7VpnuoOGnqfKucXrCA=; b=kbuII00oaB8c3wPSJkhDjs2pEGX+A5anZ1NMP83s0Yocc1LMYXwzTVhXW05gvxQ3/w /CFjW4/YMfUgLSRazu4LIZxESxw7QsAZdx2sknxsRp3Vvi34zKgL91tnyzVCw9oLolr7 JC//B7OQIEtKB1jam/KEekMbYJC3Oru9MLI18J9KnXbZd4xH+oUeaguzp7jbrROnsGcR JmXj52MPTENrLT6Wv+zzgahRMghheeA4vyOtTjFFk3vg4i0lHXPJXulQq9l0rn9Te2+8 q9A8kOzm9IkB0U+2ev5zuCDYcrVF971jyLhABGuW3cJFZpAA8dMc3NjHJZ2U1Dt4IOW1 5fWA== X-Gm-Message-State: AG10YOTPKozSKN9jwsR6rzo0n8O+ziZqKKdfTGkkYmlzLOE2lnCQtefL3i1ZeAVALHik2WSMU15uU+0wY+ea3A== MIME-Version: 1.0 X-Received: by 10.25.28.80 with SMTP id c77mr7713719lfc.74.1454279803417; Sun, 31 Jan 2016 14:36:43 -0800 (PST) In-Reply-To: References: <56AC2C35 DOT 9060903 AT cornell DOT edu> Date: Sun, 31 Jan 2016 22:36:43 +0000 Message-ID: Subject: Re: cygwin_conv_path sometimes removes trailing slash From: Ray Donnelly To: cygwin AT cygwin DOT com Content-Type: multipart/mixed; boundary=001a11401eba16e609052aa8e7da X-IsSubscribed: yes --001a11401eba16e609052aa8e7da Content-Type: text/plain; charset=UTF-8 On Sun, Jan 31, 2016 at 10:17 PM, Ray Donnelly wrote: > On Sun, Jan 31, 2016 at 11:38 AM, Jan Nijtmans wrote: >> 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: >> >> 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. >> > > I've attached the patch that we use on MSYS2 for this. We found > ourselves patching projects all over the open-source landscape > otherwise so fixing it once and for all seems sensible. Note however, > a full fix also requires another patch that I posted two years ago [1] > that Corinna chose not to apply. In the two years since, we've yet to > find any issue with that patch. I will rebase it shortly in-case > there's any interest in reconsidering it. > > [1] https://cygwin.com/ml/cygwin-patches/2014-q1/msg00010.html Attached is the rebased version of this patch. I guess these should go to cygwin-patches. I'll send them there if you prefer Corinna? Best regards, Ray. > > Best regards, > > Ray Donnelly. > >> Regards, >> Jan Nijtmans >> >> -- >> 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 >> --001a11401eba16e609052aa8e7da Content-Type: application/octet-stream; name="0002-Reattach-trailing-dirsep-on-existing-directories-too.patch" Content-Disposition: attachment; filename="0002-Reattach-trailing-dirsep-on-existing-directories-too.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ik34lzn91 RnJvbSA4NjMwMWRmZDA1NzMwYmNkMzc0NzkyY2RhNDk3ODEyYWNmZTg1ZjQ2 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBSYXkgRG9ubmVsbHkg PG1pbmd3LmFuZHJvaWRAZ21haWwuY29tPgpEYXRlOiBTdW4sIDMxIEphbiAy MDE2IDIyOjIyOjQzICswMDAwClN1YmplY3Q6IFtQQVRDSCAyLzJdIFJlYXR0 YWNoIHRyYWlsaW5nIGRpcnNlcCBvbiBleGlzdGluZyBkaXJlY3RvcmllcyB0 b28KIChwcmV2aW91c2x5IHRoaXMgd291bGQgb25seSBoYXBwZW4gdG8gbm9u LWV4aXN0aW5nIG9uZXMpLgoKCSogcGF0aC5jYyAocGF0aF9jb252OjpjaGVj ayk6IFJlYXR0YWNoCgkgIHRyYWlsaW5nIGRpcnNlcCBvbiBleGlz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X0RJUkVDVE9SWSkK LS0gCjIuNS4zCgo= --001a11401eba16e609052aa8e7da Content-Type: text/plain; charset=us-ascii -- 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 --001a11401eba16e609052aa8e7da--