Browse Source

mount: resolve symlink

pull/3354/head
chrislu 2 years ago
parent
commit
7386cf6a06
  1. 4
      weed/mount/weedfs.go

4
weed/mount/weedfs.go

@ -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
} }

Loading…
Cancel
Save