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:from:date :message-id:subject:to:content-type; q=dns; s=default; b=oebRhU8 vWPOW/4Ni9p42HB6ohpn4BlffLG7elRhaQjGrjCAFkdvqAGfGFCgpK4S1IlUfEOM thdyeCMBOrl8BC1k1TuMq/slxOED9W6jLtq3T3k9h+j0lZkH9s25xNeNwp6JtA5K T7y1jEiKN9tZkMes23fzP1tbcnyrYPjG4vio= 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:from:date :message-id:subject:to:content-type; s=default; bh=xXB0+HHtN5bvx PuQCcLipfnYI+E=; b=eJg4gNFBxrYLSAgssGx6JWqXSfnH5w3NhKDq0ov/3up5J OvfmrOx2zVeYtzmHqCam6YPh3qwrdiJ9atu+OHfmn7sqDGAd1d/HrTM0d5fedffm X71L174QtSdgYNJPugYkgLRjGHh9KY0KvoJjlX3BBBkfo/BEBd3iKSgMUDQSBc= 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=1.4 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=U*Stromeko, sk:Stromek, sk:stromek, stromekonexgode X-HELO: mail-it0-f52.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:from:date :message-id:subject:to; bh=fDT3emKgvXQcqepHRDMWUFuAqRVvNV3jMzwcAjxioRA=; b=JAq+PG4ui8HKMcmCYU5xAPaFfqySs+v7f0Wv9+xfgNDE+MzG7vJG5LXnwZtBkmuMKa i/MayNMG8fkVeuGzjiZmyskyZGUeJfg8TAhqQ2tEo0z9iioiI3cVwOWaXC/Hg+xTaZGO XKB9ZaOxEL4ZBXA3ER7BdWSwFS9cThnFkqYOTOhZnc+akAzKqD9LoPnTl1N2i0oQa7Ne FDLdGXzmCAT2Wx5eZizgFEJwXs3vPMonTX1dhkNSFjAJpdVAjbh0Qi0dCpqIuiIu+cy7 O9pJoXhqt18pOlYIWXfa+HtgFzgdaD6LwlyDoymUyvHpPYg2lUThqUSi4SvkuyJWyyH/ eoDQ== X-Gm-Message-State: AA6/9RlCzxaWQoJE4qOwptB+oCayOtd+BhnIrbzfM3QJFwvSBdArFlMdw8sFRcQBFWmNs7FBgjKAnS5TiacXkQ== X-Received: by 10.36.210.70 with SMTP id z67mr34507957itf.67.1475786857607; Thu, 06 Oct 2016 13:47:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87zimhp9df.fsf@Rainer.invalid> References: <87zimhp9df DOT fsf AT Rainer DOT invalid> From: Andre Maroneze Date: Thu, 6 Oct 2016 22:47:17 +0200 Message-ID: Subject: Re: cygpath 2.6.0: -m " C:" and garbled output To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Just to clarify, " C:" is not the entire filepath I was giving to cygpath, it's more like " C:/Temp/a.txt", but I reduced to it when trying to isolate the difference between versions. On Thu, Oct 6, 2016 at 9:26 PM, Achim Gratz wrote: > A filename can legitimately start with a space and it is a relative filename in that case. So dropping the space just to get something that looks like a drive letter is wrong. Indeed! I hadn't thought it that way, and it nicely explains why no conversion happens without the space (in which case it would be considered an absolute file path, despite starting with "C:"). > That's how the otherwise forbidden ":" character gets encoded into the filename. I do know that ":" is forbidden in a filename, but because I (assumed I) was giving it a file path (and one which was supposed to be absolute), I didn't consider that the rules about special filenames would apply. But having a relative file path changes everything. >> In cygpath 2.5.2 (and 2.4.1, which I also could test), it outputs C:, as I would expect. > > No, that's wrong as explained above. I should have said, "as I got used to expect due to past behavior". I would guess those versions were more lenient towards absolute file paths, which would however be an issue for filenames starting with spaces. Thanks to both of you for the clarifications. In the end, the extra whitespace was incorrectly inserted by a makefile function call, so I fixed it anyway, but I wanted to fully understand the issue to avoid incurring into similar problems later. -- 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