mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
mount: resolve symlink
This commit is contained in:
parent
40089b6753
commit
7386cf6a06
|
@ -139,6 +139,10 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
|
|||
return path, fh, entry, fuse.OK
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue