X-Recipient: archive-cygwin@delorie.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:date:from:to:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=GIRsTLNOraaPrIRRIquX3pyv5ogXeuwHygkjFoXU51A5Bla/Xf2BE
	lT2fuD4JMnym1j6ydoNG4F+pMMwaE3qrsVrM/yzGVCQKkHSP5t9vVjIFW4d6VyQk
	eK3b6hHIGoRq/4rrDLZ8dSwrfYaoR7kLiGoB6FetTXbfVm7F77Hmjk=
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:date:from:to:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=15LSEMqNgl8A8onKq99X3RCsB2w=; b=ophLUB4uM8fYUV2mnHKnCZRWP6hZ
	QtPIUp4kDugwkRp3F4KOq+L/emytghpuqVVK+1izrlORiUGYjNB1RsAyrOaFWpid
	wL3YPrqi1FVzjfUKzzemuprk19+ddvXpSVmsqMiCjOS2LnYmtkAXNgdQt6ewaRT2
	fPPFbnag/5F+EO0=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-102.3 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=Maintainer, DOT, honor, Greetings
X-HELO: calimero.vinschen.de
Date: Thu, 7 Jan 2016 21:19:38 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Cc: Bryan Henry <bryanhenry@mac.com>
Subject: Re: Question about incorrect System path from cygpath with case-sensitivity enabled
Message-ID: <20160107201938.GG20447@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com, Bryan Henry <bryanhenry@mac.com>
References: <B9C70902-5C7E-4AC6-A63A-583DCEC2771C@mac.com> <1710491599.20160102183319@yandex.ru>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="gvF4niNJ+uBMJnEh"
Content-Disposition: inline
In-Reply-To: <1710491599.20160102183319@yandex.ru>
User-Agent: Mutt/1.5.24 (2015-08-30)

--gvF4niNJ+uBMJnEh
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jan  2 18:33, Andrey Repin wrote:
> Greetings, Bryan Henry!
>=20
> > I enabled (some time ago, not recently) case sensitivity on my Windows =
8.1
> > system by setting the registry key mentioned in the FAQ here:
> > https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-case=
sensitive
>=20
> > Today, I updated Cygwin and noticed a message about a failed postinstall
> > script at the end. Here's the excerpt from setup.log.full showing
> > /etc/postinstall/base-files-mketc.sh exiting early:
>=20
> > 2016/01/01 15:45:32 running: C:\cygwin\bin\bash.exe --norc --noprofile
> > "/etc/postinstall/base-files-mketc.sh"
> > Directory /C/WINDOWS/System32/drivers/etc does not exist; exiting
> > If directory name is garbage you need to update your cygwin package
> > 2016/01/01 15:45:32 abnormal exit: exit code=3D1
>=20
> > Since this was an existing installation, that postinstall script failing
> > isn't a big deal since the symlinks that it would normally create alrea=
dy
> > exist, but I wanted to dig into why it's failing in the first place in =
case
> > it is a symptom of something bigger. Taking a look at that script and t=
rying
> > "/usr/bin/cygpath -S -u" for myself, I see now why it failed:
>=20
> > [~]$ cygpath -S -u
> > /C/WINDOWS/System32
> > [~]$ file `cygpath -S -u`
> > /C/WINDOWS/System32: cannot open `/C/WINDOWS/System32' (No such file or=
 directory)
> > [~]$ file /C/Windows/System32
> > /C/Windows/System32: directory
>=20
> > I get similar results from "cygpath -W". It seems that cygpath has not
> > picked up on the fact that the directory is really "Windows" and not
> > "WINDOWS",
>=20
> cygpath uses system calls to return the directories you're asking for.

...and those system calls return information which does not honor
case-sensitivity, unfortunately.

> If a system call return wrong case, cygpath can't do anything to amend it.

It can and it will, at least if the path is a local path.  I just
applied a patch to cygpath to call another OS function to correct the
case of the path returned by GetSystemDirectory and friends.

> You have to fix your system first, then it will just work.

This is nonsense.  It's not the user's fault that the OS returns paths
without honoring the case.  Cygwin tries to support case-sensitivity
(https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesen=
sitive)
and so it makes a lot of sense if cygpath tries to return system paths
using the correct case.

I just uploaded new developer snapshots to https://cygwin.com/snapshots/
Please give cygpath from those snapshots a try.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--gvF4niNJ+uBMJnEh
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWjshaAAoJEPU2Bp2uRE+gibEP/16O98eF3IUfRxeiqDYL1bfC
5KNTlAc/I36azJhfMUyVyqPY+7yp0PwRLGvmmGzF8a0Y3pzjMbISuSeAYm3hmMQ8
oMv4s+wB2f0Kx+8RK5paT/GCdi4PR1awde3+XJfCR6Z3vkzMESfdDr5759KiqKWA
N5EAmyvEvXZ7E7cfjtHE/704MF3kY7lv5CUI5kT1Y3HJ3k+gcsqN6eCTssJfeN+4
wJ8ShUI99kA+qsG7uIA6L+23+Q+X6kXRXo3gYP5i3XPv3n0GwtP0SeYSVhG4Geqq
f+cXWS8WsLvIJjJCjStz91LsHpKrejQsn8PphXo8X4AmAHZYx+WMPaytuNFkGAbb
xP0+KERkw/zEkr6T7SJOruZ9gG3Dhm0IrdchHNG1LvhYVoqb23jXOGRbfLc67nRE
Kp6IhSwZ07j3OCZLHsdsMPODYLIBhBWlAhek/Y9Rl+8oU/+hbxFJE+OoS5JMGSWF
B+WFvAu54JOGiOjMZzqIBmsd2BqWqzkxZ/Ve86pp0gaiAzTwQFGJNpgvNdulPtpI
+sN3rD5p7e4CRi+6g41FOjpadivEBo/OAzWvfgcG33jEiTeQ+b3giUXIMckOX42M
9DhJd7IaDTh7jw/BmW04OZdCf2mnl+BjKeA9wuxt3nB+WvfJuTwJI1HuhS2sfE0c
twcDXBTjdPksSaiBXV+R
=Uogk
-----END PGP SIGNATURE-----

--gvF4niNJ+uBMJnEh--
