diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-04 01:35:18 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-04 01:35:18 -0700 |
| commit | bd13a7968f9cc7620f19511e896c6e0099ff7f86 (patch) | |
| tree | 91f207be11316c9e8c137f20cd537a9a2a4d3a28 /weed/mount/weedfs.go | |
| parent | 88945d99546dda6a5f92c910aa86ca91e050873a (diff) | |
| download | seaweedfs-bd13a7968f9cc7620f19511e896c6e0099ff7f86.tar.xz seaweedfs-bd13a7968f9cc7620f19511e896c6e0099ff7f86.zip | |
remove unused symlink resolving
Diffstat (limited to 'weed/mount/weedfs.go')
| -rw-r--r-- | weed/mount/weedfs.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index 06dfb9bbb..aaaa2877d 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -125,7 +125,7 @@ func (wfs *WFS) Init(server *fuse.Server) { wfs.fuseServer = server } -func (wfs *WFS) maybeReadEntry(inode uint64, followSymLink bool) (path util.FullPath, fh *FileHandle, entry *filer_pb.Entry, targetInode uint64, status fuse.Status) { +func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle, entry *filer_pb.Entry, status fuse.Status) { path, status = wfs.inodeToPath.GetPath(inode) if status != fuse.OK { return @@ -139,16 +139,6 @@ func (wfs *WFS) maybeReadEntry(inode uint64, followSymLink bool) (path util.Full } else { entry, status = wfs.maybeLoadEntry(path) } - targetInode = inode - if status == fuse.OK && followSymLink && entry.FileMode()&os.ModeSymlink != 0 { - if entry != nil && entry.Attributes != nil && entry.Attributes.Inode != 0 { - targetInode = entry.Attributes.Inode - } - target := util.FullPath(filepath.Join(string(path), "../"+entry.Attributes.SymlinkTarget)) - targetParent, _ := target.DirAndName() - wfs.inodeToPath.EnsurePath(util.FullPath(targetParent), true) - entry, status = wfs.maybeLoadEntry(target) - } return } |
