public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
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
Date: Fri, 08 Jan 2016 02:14:00 -0000	[thread overview]
Message-ID: <20160107201938.GG20447@calimero.vinschen.de> (raw)
In-Reply-To: <1710491599.20160102183319@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 2785 bytes --]

On Jan  2 18:33, Andrey Repin wrote:
> Greetings, Bryan Henry!
> 
> > 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-casesensitive
> 
> > 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:
> 
> > 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=1
> 
> > Since this was an existing installation, that postinstall script failing
> > isn't a big deal since the symlinks that it would normally create already
> > 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 trying
> > "/usr/bin/cygpath -S -u" for myself, I see now why it failed:
> 
> > [~]$ 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
> 
> > 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",
> 
> 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-casesensitive)
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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-07 20:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01 21:21 Bryan Henry
2016-01-02 15:35 ` Andrey Repin
2016-01-08  2:14   ` Corinna Vinschen [this message]
2016-01-11  9:26     ` Bryan Henry
2016-01-11  9:38       ` Bryan Henry
2016-01-11 11:55       ` Corinna Vinschen
2016-01-02 20:34 ` Michael Enright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160107201938.GG20447@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=bryanhenry@mac.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).