public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Bryan Henry <bryanhenry@mac.com>
To: cygwin@cygwin.com
Cc: corinna-cygwin@cygwin.com
Subject: Re: Question about incorrect System path from cygpath with case-sensitivity enabled
Date: Mon, 11 Jan 2016 09:38:00 -0000	[thread overview]
Message-ID: <AC545912-3E03-4C1D-A294-6060F2168FA3@mac.com> (raw)
Message-ID: <20160111093800.I2uNAEJnSCVQpZUlurBDazylReIwGCop3-alxuTI65s@z> (raw)
In-Reply-To: <20160107201938.GG20447@calimero.vinschen.de>

Hi Corinna,

Sorry for the delay getting back to you. I tested out the cygpath binary from the latest snapshot and confirmed that it fixes my issue. Thank for you making the change!

[~/Downloads/cygwin-inst-20160109]$ cygpath -W -u
/C/Windows
[~/Downloads/cygwin-inst-20160109]$ cygpath-old -W -u
/C/WINDOWS

- Bryan

> On Jan 7, 2016, at 3:19:38 PM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> 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


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

  reply	other threads:[~2016-01-11  3:54 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
2016-01-11  9:26     ` Bryan Henry [this message]
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=AC545912-3E03-4C1D-A294-6060F2168FA3@mac.com \
    --to=bryanhenry@mac.com \
    --cc=corinna-cygwin@cygwin.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).