diff options
Diffstat (limited to 'weed/mount/inode_to_path.go')
| -rw-r--r-- | weed/mount/inode_to_path.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go index edea91a5d..ae95730e1 100644 --- a/weed/mount/inode_to_path.go +++ b/weed/mount/inode_to_path.go @@ -3,6 +3,7 @@ package mount import ( "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/util" + "github.com/hanwen/go-fuse/v2/fuse" "sync" ) @@ -65,14 +66,14 @@ func (i *InodeToPath) GetInode(path util.FullPath) uint64 { return inode } -func (i *InodeToPath) GetPath(inode uint64) util.FullPath { +func (i *InodeToPath) GetPath(inode uint64) (util.FullPath, fuse.Status) { i.RLock() defer i.RUnlock() path, found := i.inode2path[inode] if !found { - glog.Fatalf("not found inode %d", inode) + return "", fuse.ENOENT } - return path.FullPath + return path.FullPath, fuse.OK } func (i *InodeToPath) HasPath(path util.FullPath) bool { |
