From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114091 invoked by alias); 1 Feb 2016 10:45:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 114019 invoked by uid 89); 1 Feb 2016 10:45:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=D*nl, Hx-languages-length:1584, D*xs4all.nl, U*houder X-HELO: mail-lb0-f175.google.com Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 01 Feb 2016 10:45:17 +0000 Received: by mail-lb0-f175.google.com with SMTP id cl12so72167268lbc.1 for ; Mon, 01 Feb 2016 02:45:17 -0800 (PST) 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=0VQ5OrUqYD1Kjh+nSpef/3Q3cP+O46Hc6NDhHqAzcGk=; b=lmVwtndvikA/2kDHz99t8+nCTdWfcBtYpBiDEWepKH8dgQEPPolp6KATs+OQCviihE 8++0yEs7XZp/+SExbloCToLKNesygn/XxQw51TNvEJs9kaVjU7B8OgEcVq1XLLF6FApi /UI42YWQTQ6WtLI6POuxbD5QkX1xHROYIJUdz30DJfuZR2CU/S+NSol3afqUj9+MMJBK ic62Rsrj7+RcWsOYrFIS9kpmI7+eAcsme3Xga1bSDaRgeN0P88WgOZyLHD7Lv8w2yrF5 Z1b1lOwTbFE9sm2WjdNCElJsa6R+pwG72SVMWKVNW2e70byyGY5mJbC3EKw1pMA+kM53 pglA== X-Gm-Message-State: AG10YORUGEdJrDDKqQmh2trhe31IQCJqCnIkldNkGmnc0JWR+scSAVFlcsPrZiJtvGQjbOndGZQsjUk1FbtXUg== MIME-Version: 1.0 X-Received: by 10.112.209.2 with SMTP id mi2mr6707862lbc.139.1454323514232; Mon, 01 Feb 2016 02:45:14 -0800 (PST) Received: by 10.112.136.200 with HTTP; Mon, 1 Feb 2016 02:45:14 -0800 (PST) In-Reply-To: References: <56AC2C35.9060903@cornell.edu> Date: Mon, 01 Feb 2016 10:45:00 -0000 Message-ID: Subject: Re: cygwin_conv_path sometimes removes trailing slash From: Ray Donnelly To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00008.txt.bz2 On Mon, Feb 1, 2016 at 10:29 AM, Henri wrote: > Jan Nijtmans 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: >> >> 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