delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/11/12/17:17:02

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:from:content-type:content-transfer-encoding
:mime-version:date:subject:message-id:to; q=dns; s=default; b=Is
5dM7io8DnR/TIxQrgEct1fJXnU4BRdzQQrwzRbBbcyfMGh+ydQNzF7SJG3rWoLP7
cF6C2jqjKap0VPlcGm45v34D17Z5w9PQm55NpRyqSxy8xFNs8UQSi+PJ+bvJJrr2
Rtk5nWnERDOxw/kksEQku2IQJxdzeb7uTWMIhb2HA=
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:from:content-type:content-transfer-encoding
:mime-version:date:subject:message-id:to; s=default; bh=ui1HwuaL
qOoe9TnZGe7YHxyiGqk=; b=NA9by57T5DRhT6J+EDNJheWrNumG8vlvHF5Yi2hd
5fdRB6CwIeFW+oQn7QCF9T3bnRtxS6ggA+tg+CW6puBlm5MIy2wO6FLfmfnmFcQI
7zqLMPOCwMGTNHH0zwwoVPhX6FqlsV2TqU/vle3ow0FJ2WwipxwR8TZ+DKr06ln2
V48=
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-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: smtp97.iad3b.emailsrvr.com
X-Auth-ID: alfred AT von-campe DOT com
X-Sender-Id: alfred AT von-campe DOT com
From: Alfred von Campe <alfred AT von-campe DOT com>
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Tue, 12 Nov 2019 17:16:09 -0500
Subject: Unexpected behavior from cygpath command
Message-Id: <033F0B97-041F-4BE4-916E-FD4361142193@von-campe.com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id xACMGhQM008480

I have two almost identical build servers, but cygpath is not behaving as expected on one of them.  Here is the output from the “good” build server:

  $ cygpath.exe —version | head -1
  cygpath (cygwin) 2.11.2
  
  $ cygpath -d 'E:\Program Files (x86)\IAR Systems'
  E:\PROGRA~1\IARSYS~1

Cygpath has correctly converted the given path to DOS (8.3) format as expected. Here is the output from the “bad” build server.

  $ cygpath.exe —version | head -1
  cygpath (cygwin) 2.11.1

  $ cygpath -d 'E:\Program Files (x86)\IAR Systems'
  E:\Program Files (x86)\IAR Systems

Why is cygpath returning the same path passed in?  Oh wait, it’s running a slightly older version (2.11.1 vs 2.11.2).  Perhaps there was a bug in the earlier version.  Let me update the Cygwin installation and try again:

  $ cygpath —version | head -1
  cygpath (cygwin) 3.1.0

  $ cygpath -d 'E:\Program Files (x86)\IAR Systems'
  E:\Program Files (x86)\IAR Systems

WTF?  Why is it still doing this?  Can there be a global config setting that affects cygpath’s behavior?  Hmm, let me try a different approach:

  $ cygpath -d "$(cygpath -u 'E:\Program Files (x86)\IAR Systems')"
  E:\PROGRA~1\IARSYS~1

Hey, cygpath can convert to DOS paths on this system after all, just not when it’s given a Windows path.  Can anyone explain this behavior?

Alfred



--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019