From: Ernie Rael <err@raelity.com>
To: cygwin@cygwin.com
Subject: /bin/pwd, cygpath -wa fail under native symlink
Date: Thu, 26 Dec 2019 06:56:00 -0000 [thread overview]
Message-ID: <43d42586-514d-476c-6e4b-84b650a827ec@raelity.com> (raw)
(CYGWIN_NT-6.1 spirit 3.1.1(0.340/5/3) 2019-12-18 09:28 x86_64 Cygwin, win7)
The windows root is C:, cygwin root is on F:.
A native symlink under C: that points into F: gets
an incorrect result from cygpath -wa.
Notice that when the current directory is the target of the symlink
then the result is ok. But any deeper in the tree fails. To summarize:
   @ /a/src/jvi-dev/jvi
$ cygpath -wa .
C:\f\src\jvi-dev\jvi <<<<<<< correct
   @ /a/src/jvi-dev/jvi/src
$ cygpath -wa .
C:\a\src\jvi-dev\jvi\src <<<<<<< fail
=== more detail ===
   @ /a/src/jvi-dev
$ ls -l jvi
lrwxrwxrwx 1 erra None 18 Dec 23 15:16 jvi -> /f/src/jvi-dev/jvi
   @ /a/src/jvi-dev
$ junction jvi
Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\a\src\jvi-dev\jvi: SYMBOLIC LINK
  Print Name    : C:\f\src\jvi-dev\jvi
  Substitute Name: \??\C:\f\src\jvi-dev\jvi
   @ /a/src/jvi-dev
$ cygpath -wa jvi
C:\a\src\jvi-dev\jvi
   @ /a/src/jvi-dev
$ cd jvi
   @ /a/src/jvi-dev/jvi
$ cygpath -wa .
C:\f\src\jvi-dev\jvi <<<<<<< correct
   @ /a/src/jvi-dev/jvi
$ cd src
   @ /a/src/jvi-dev/jvi/src
$ cygpath -wa .
C:\a\src\jvi-dev\jvi\src <<<<<<< fail
=== some possibly relevent stuff from the mount table
$ mount
F:/cygwin64 on / type ntfs (binary,auto)
C:/f on /f type ntfs (binary,user)
F:/c on /c type ntfs (binary,user)
F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)
--
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
next reply other threads:[~2019-12-25 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-26 6:56 Ernie Rael [this message]
2020-01-07 17:00 ` How to get the drive a file is on (was Re: /bin/pwd, cygpath -wa fail under native symlink) Ernie Rael
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=43d42586-514d-476c-6e4b-84b650a827ec@raelity.com \
--to=err@raelity.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).