mount: fix identification of symlinks in directory listings

This commit is contained in:
huangnauh 2025-08-17 19:57:35 +08:00 committed by GitHub
parent cb1507fa96
commit cc20d93f47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,12 @@ func (d *Dir) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error)
if node.IsDir() {
dirent.Type = fuse.DT_Dir
}
switch node := node.(type) {
case *vfs.File:
if node.IsSymlink() {
dirent.Type = fuse.DT_Link
}
}
dirents = append(dirents, dirent)
}
itemsRead = len(dirents)