delorie.com/archives/browse.cgi | search |
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=Ai | |
B881Fx1y/OqsYY/FueS7hfQ0PGCUKuthejD6WkPtPlPOj84dJgQaJuLdopSK5MeC | |
MBGQY4BStt3M+SeUsKEzNLUxPYrpldCkHhELxntcd0opiK9IHFN883ydL2lHsU9V | |
lopjBgO0Ze9m1imwAaqVjUPd85unciMy66qyC3tOM= | |
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=3Efzmpoy | |
sGx12BNE+hxXE8ADgUo=; b=GyQLqe2f6OvAEjpDS3dYbPuR40vGoPyptkJPjdQ2 | |
nf68WCGuWmC17GkePWzQG2VlwdrmXxRHqHEyf3yz+v8zX3xNvHN/wcVvctBjeVt+ | |
O2bR7S6eAkM7DWqgpjVBv51uXWQ1eLPhhDgvlu7TSBH9Ktsk6fwOsaoIzLx13+Yb | |
odI= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=ray, cygwin-patches, cygwinpatches, Hx-languages-length:1448 |
X-HELO: | mail-lf0-f53.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=C6iaPcRqf6WGgAFeeKeTzaSZK8Him9jknPHcSWBCICs=; b=AI+qyXs9Y0Di0QlVKrCSLiX4mNgI7qBishrMWU2e6slbtj6ZJWLT8n2RgQ2sottK5u wTaTLn0lCiO+ZJrfGsA1pg62YnH4s//4vNVVD+p/yOva9xnHbd7nFuKpKqePSF5Pdk2n 6NKj8ZCMJvPPKNHgZfdfwu0Y35omCjiMcyy0hFbhcVrb126g3Bhd64lTjaIi8xS2wJ/3 JKEf3zGcX6fFeQI0lVE0TuKuQ3XOWryjkZwM+eTmLCfrMdQp+lHLB6LJMXe7Zv55tSUm aGc+yRlBAMNLKaDbS7mtM9zRtuvzCq7L3f0dkI9CPWzMQxxtoHpl+A4qW9m08RIp8EGl P5PA== |
X-Gm-Message-State: | AG10YOQKRv/OnM7egE6HedFTt1WR5N/9waHIPCQStWFwucoPLmFokVzqKYd+u2mq990+yHCfaJK+9RsfaVsGTQ== |
MIME-Version: | 1.0 |
X-Received: | by 10.25.28.80 with SMTP id c77mr7693006lfc.74.1454278637389; Sun, 31 Jan 2016 14:17:17 -0800 (PST) |
In-Reply-To: | <CAO1jNwv+Lza40TnN+woA_R1HpsnEZZvYda2f8A49NE+xvKUCGw@mail.gmail.com> |
References: | <56AC2C35 DOT 9060903 AT cornell DOT edu> <CAO1jNwv+Lza40TnN+woA_R1HpsnEZZvYda2f8A49NE+xvKUCGw AT mail DOT gmail DOT com> |
Date: | Sun, 31 Jan 2016 22:17:17 +0000 |
Message-ID: | <CAOYw7ds-N=f+JCn-2rtFqOyahmA_M9mVNwv1CZH6__M-K7ht1A@mail.gmail.com> |
Subject: | Re: cygwin_conv_path sometimes removes trailing slash |
From: | Ray Donnelly <mingw DOT android AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
--001a11401eba966864052aa8a147 Content-Type: text/plain; charset=UTF-8 On Sun, Jan 31, 2016 at 11:38 AM, Jan Nijtmans <jan DOT nijtmans AT gmail DOT com> 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: > <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. > 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 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 > --001a11401eba966864052aa8a147 Content-Type: application/octet-stream; name="0001-Don-t-remove-trailing-slash-from-root.patch" Content-Disposition: attachment; filename="0001-Don-t-remove-trailing-slash-from-root.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ik33x7sv0 RnJvbSBkYTkyYjhmYzNiZWIzYWVlZGQ5ZDMwYzZkMjk2ODFlZDljNDhmNmRh IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBSYXkgRG9ubmVsbHkg PG1pbmd3LmFuZHJvaWRAZ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ciAi LyIgbXVzdCBzZXQgbmVlZF9kaXJlY3RvcnksIHdpdGhvdXQgcmVtb3ZpbmcK KwkgICAgIHRyYWlsaW5nIHNsYXNoICovCisJICBlbHNlIGlmICh0YWlsID09 IHBhdGhfY29weSArIDEgJiYgaXNzbGFzaCAodGFpbFstMV0pKQorCSAgICB7 CisJICAgICAgbmVlZF9kaXJlY3RvcnkgPSAxOworCSAgICB9CiAJICBwYXRo X2VuZCA9IHRhaWw7CiAKIAkgIC8qIFNjYW4gcGF0aF9jb3B5IGZyb20gcmln aHQgdG8gbGVmdCBsb29raW5nIGVpdGhlciBmb3IgYSBzeW1saW5rCi0tIAoy LjUuMwoK --001a11401eba966864052aa8a147 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 --001a11401eba966864052aa8a147--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |