diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-18 00:45:43 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-18 00:45:43 -0800 |
| commit | f9d33f70b0529451c583c2fe41685fbe4234069e (patch) | |
| tree | aadf1c22f63603e2ff224c150aeac668409bd37a /weed/mount/weedfs.go | |
| parent | b9cf4f12fcab2c0fdd35af256faa28f53a414dc2 (diff) | |
| download | seaweedfs-f9d33f70b0529451c583c2fe41685fbe4234069e.tar.xz seaweedfs-f9d33f70b0529451c583c2fe41685fbe4234069e.zip | |
return fuse.Status when looking up by inode
Diffstat (limited to 'weed/mount/weedfs.go')
| -rw-r--r-- | weed/mount/weedfs.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index b070fdd6c..1ec74b9e4 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -2,6 +2,7 @@ package mount import ( "context" + "fmt" "github.com/chrislusf/seaweedfs/weed/filer" "github.com/chrislusf/seaweedfs/weed/mount/meta_cache" "github.com/chrislusf/seaweedfs/weed/pb" @@ -110,7 +111,10 @@ func (wfs *WFS) String() string { } func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle, entry *filer_pb.Entry, status fuse.Status) { - path = wfs.inodeToPath.GetPath(inode) + path, status = wfs.inodeToPath.GetPath(inode) + if status != fuse.OK { + return + } var found bool if fh, found = wfs.fhmap.FindFileHandle(inode); found { return path, fh, fh.entry, fuse.OK |
