Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[BUG] zgetdir() in a directory of a bind mount returns "."



Hi,

This happened when I ran sudo because sudo unsets $PWD.  Example how
to reproduce this (worked on multiple machines running linux):

# setup
mkdir -p /tmp/a/b/c /tmp/bind
mount -o bind /tmp/a/b /tmp/bind
cd /tmp/bind
# bug if output is "."
PWD=/tmp zsh -c pwd
# cleanup
cd /
umount /tmp/bind
rm -r /tmp/a /tmp/bind

The source and target directory of the bind mount have to be in
different directories.  With -DUSE_GETCWD=1 the bug does not occur.



Messages sorted by: Reverse Date, Date, Thread, Author