You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] find . / ls -l in a symlinked directory see the link, not its contents (. and trailing / don't follow) #387
find: 0
lrwxrwxrwx 1 Nov 21 07:34 . -> d
lrwxrwxrwx 1 Nov 21 07:34 /tmp/ld/ -> d
test -L: 0
find . -name keep and find /tmp/ld/ -name keep print nothing and exit 0, so a search run from inside a symlinked directory silently finds no files. Plain ls (without -l) lists keep correctly.
Additional Context
vfs::absolute normalizes the path before VfsKernel::lstat (src/vfs_kernel.rs:536) resolves it, which drops the trailing / and the final .. lstat then resolves /tmp/ld without following and reports the link. POSIX path resolution follows a symlink when the name ends in / or the last component is ..
Found while reviewing #377: direct binds did not have this behaviour on main (their lstat followed everything), and get it once lstat stops following there.
Possible Solution
In VfsKernel::lstat, follow the last component when the caller's path ends in / or its last component is . or .., for both the in-memory and the host branch.
Activity