This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

BUG: /bin/pwd -P doesn't expand all symlinks


Hi,

While using /bin/pwd -P to expand directories to get the absolute, non-symlinked version of the directory I discovered that this doesn't work on Cygwin as I believe it is meant to work.


$ cd /tmp
$ /bin/pwd -P
/tmp
$ ln -s /home .
$ cd home
$ /bin/pwd -P
/home
$ pwd
/tmp/home
$ mkdir dummy
$ cd dummy
$ pwd
/tmp/home/dummy
$ /bin/pwd -P
/tmp/home/dummy

NOTE:  That last command should have returned "/home/dummy".  It hasn't expanded the parent symbolic link as you would have expected it to do.

For what I'm doing I need the physical path, not the symbolic path (which is what the -P is meant to provide).

Please confirm if I'm correct in my understanding?  I've tested this on Ubuntu and it works as I'd expect it...

Now having to create an alternative approach to get the correct answer while I wait for this to be fixed (assuming it is a bug as I believe it is).

Thanks in advance for any help in resolving this.

Cheers,
Mark.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]