Krzysztof Zelechowski wrote:

Description:
        The text of pwd and the value of $PWD return a cached value, regardless 
of the actual current path.
Repeat-By:
        mkdir '-p' 'a' && cd 'a' && mv '../a' '../b' && enable '-n' 'pwd' && builtin 
'pwd' && pwd

Fix:
        cd '-P' '.'

I think it's the same mechanism that catches symlinked directory names, 
i.e. the shell has its own "view" to the filesystem.
For symlinked directories this is not a bug.

For this case, I don't think there's a reliable and portable way to catch it. The open directory is valid (since it's open) for the shell process, but $PWD given to other programs will make them fail. But i don't think a getcwd() after every command or every now and then is efficient.
The"no solution provided"Bonsai


Reply via email to