mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 22:57:56 +08:00
mount: resolve symlink
This commit is contained in:
@@ -139,6 +139,10 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
|
|||||||
return path, fh, entry, fuse.OK
|
return path, fh, entry, fuse.OK
|
||||||
}
|
}
|
||||||
entry, status = wfs.maybeLoadEntry(path)
|
entry, status = wfs.maybeLoadEntry(path)
|
||||||
|
if status == fuse.OK && entry.FileMode()&os.ModeSymlink != 0 {
|
||||||
|
target := filepath.Join(string(path), "../"+entry.Attributes.SymlinkTarget)
|
||||||
|
entry, status = wfs.maybeLoadEntry(util.FullPath(target))
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user