Different symlink resolution in native console vs. terminal

L A Walsh cygwin@tlinx.org
Tue Mar 16 13:34:23 GMT 2021

On 2021/03/10 14:51, Andrey Repin wrote:
> Running `pwd -P` or `readlink -e .` in a specific directory from native
> terminal provide unresolved answers.
> The directory $HOME/Documents/EVE is a symlink pointing to $HOME\Documents\Games\EVE.
> When running either command inside the directory from native terminal, the
> result is literally /home/Documents/EVE, but when running the same command
> from mintty inside same directory, the results may vary.
> $HOME/Documents/EVE or $HOME/Documents/Games/EVE (which is expected answer).
> It also seems, there are results difference between `bash -l` `and bash -i`
> and `pwd -P` and `readlink -e .`.
> Generally, "pwd" is more correct.
1) When you look at the processes(native v mintty), are both the
same #bits?

2) Can you reproduce this with any other dir?

Both Documents and Games have multiple copies due to the public
docs+games  are in the docs+games library (along with user versions).

Maybe the winterm is picking up a different file?

3) do you actually have a directory named '$HOME' or is it a real

4) the symlink is in 'EVE' in both cases, yes?
Can you copy 'EVE' (the symlink) to a dir like /tmp and do they resolve
differently there?

I think one or both of those dirs have a GUID associated with them, maybe
one is using a different GUID than the other?

I also have Win7x64 but have never seen them misbehaving...

How was your link made?

More information about the Cygwin mailing list