public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Arthur Norman <acn1@cam.ac.uk>
To: cygwin@cygwin.com
Subject: symbolic links to /cygdrive/X/xxx with capital letter X
Date: Fri, 12 Jun 2020 08:06:24 +0100 (GMT Summer Time)	[thread overview]
Message-ID: <alpine.WNT.2.00.2006120735160.21688@panamint> (raw)

This running on Windows 10 1909 and cygwin has been updated to the latest 
version. The effect was also visible on a freshly installed minimal cygwin 
put on an almost fresh Windows 10 VM.

Cygwin these days seems to have a behaviour that confuses me regarding the 
case of a disk name:

> ln -s "/cygdrive/c/Program Files" pf1
> ln -s "/cygdrive/C/Program Files" pf2
> ls -l pf*
lrwxrwxrwx 1 acn1 None 25 Jun 12 07:37 pf1 -> /cygdrive/c/Program Files
lrwxrwxrwx 1 acn1 None 20 Jun 12 07:37 pf2 -> /mnt/C/Program Files
> cygpath -ma ./pf1
C:/cygwin64/home/acn1/pf1

You see from the above that when I use cygpath to convert from a cygwin 
name the drive letter C: is returned in upper case. When that ends up 
after "/cygdrive" the path behaves as I expect almost everywhere by is 
treated specially for symbolic links. This seems to be a relatively new 
behaviour and it bit me!

[Use-case: I wanted to convert cygwin paths to be "very absolute" so that 
eg my home directory is not rendered as /home/acn1 but as 
/cygdrive/c/cygwin64/home/acn1, so I had a few lines of shell script to 
achieve that. I was building a package and I build both a cygwin32 and a 
cygwin64 version, so the "very absolute" paths are portable between the 
two worlds, both of which were important when I first set this up. Things 
recently broke and on investigation it was because somewhere deep in 
build scripts links to /mnt/C/... had been set up and were not usable. I 
can of course work round the issue but being confident I have spotted all 
cases causes me work!]

Arthur


             reply	other threads:[~2020-06-12  7:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  7:06 Arthur Norman [this message]
2020-06-12 11:03 ` Andrey Repin
2020-06-12 17:51   ` Wayne Davison
2020-06-13 20:47     ` Andrey Repin
2020-06-13 23:33       ` Wayne Davison
2020-06-30 11:14 ` Corinna Vinschen

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=alpine.WNT.2.00.2006120735160.21688@panamint \
    --to=acn1@cam.ac.uk \
    --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).