Subject: Broken pwd or how can I resolve symlnks?
From: [email-masked] (Igor boukanov)

4 Dec 1998 22:10:18 -0800
Message-ID: <[email-masked]>
To: [email-masked]
Cc: [email-masked]

Hello!

I noticed then when I have a symlink to a directory and the make cd to the symlink, 
pwd does not print the directory link points to. I.e.:
cd //d/tmp
mkdir a
ln -s a b
cd b
pwd
//d/tmp/b
       ^^^
when I expect that last pwd should print 
//d/tmp/a

The similar problem comes from cygpath utility. 
It does not resolve simplinks in path components.
Example:

cd //d/tmp
touch a.txt
ln -s a.txt b.txt
cygpath -w b.txt
d:\tmp\b.txt

when the last cygpath should IMHO print a.txt.

I tried to resolve a problem with cygpath and what I realized is that the function

extern "C" void cygwin_conv_to_win32_path(
    const char *path, char *win32_path);

does not resolve symlinks either.

Well, I can write my own version of cygpath that does not have this problem but then I will depends on the exact knowledge of symlink file format because very useful function readlink is absent from the cygnet api...

So maybe there is a better way to resolve that symlinks problem?
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".