aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs_dir_mkrm.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/weedfs_dir_mkrm.go')
-rw-r--r--weed/mount/weedfs_dir_mkrm.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/weed/mount/weedfs_dir_mkrm.go b/weed/mount/weedfs_dir_mkrm.go
index 17b70cacd..a73bb3c2a 100644
--- a/weed/mount/weedfs_dir_mkrm.go
+++ b/weed/mount/weedfs_dir_mkrm.go
@@ -37,7 +37,10 @@ func (wfs *WFS) Mkdir(cancel <-chan struct{}, in *fuse.MkdirIn, name string, out
},
}
- dirFullPath := wfs.inodeToPath.GetPath(in.NodeId)
+ dirFullPath, code := wfs.inodeToPath.GetPath(in.NodeId)
+ if code != fuse.OK {
+ return
+ }
entryFullPath := dirFullPath.Child(name)
@@ -89,7 +92,10 @@ func (wfs *WFS) Rmdir(cancel <-chan struct{}, header *fuse.InHeader, name string
return fuse.Status(syscall.ENOTEMPTY)
}
- dirFullPath := wfs.inodeToPath.GetPath(header.NodeId)
+ dirFullPath, code := wfs.inodeToPath.GetPath(header.NodeId)
+ if code != fuse.OK {
+ return
+ }
entryFullPath := dirFullPath.Child(name)
glog.V(3).Infof("remove directory: %v", entryFullPath)