mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-05-20 10:20:00 +02:00
non-recursive directory deletion
fix a problem during git checkout a different version, where updated directories are deleted even though the directory is not empty.
This commit is contained in:
parent
36931babf9
commit
69a2e503ab
|
@ -104,7 +104,7 @@ func (wfs *WFS) Rmdir(cancel <-chan struct{}, header *fuse.InHeader, name string
|
||||||
|
|
||||||
glog.V(3).Infof("remove directory: %v", entryFullPath)
|
glog.V(3).Infof("remove directory: %v", entryFullPath)
|
||||||
ignoreRecursiveErr := true // ignore recursion error since the OS should manage it
|
ignoreRecursiveErr := true // ignore recursion error since the OS should manage it
|
||||||
err := filer_pb.Remove(wfs, string(dirFullPath), name, true, true, ignoreRecursiveErr, false, []int32{wfs.signature})
|
err := filer_pb.Remove(wfs, string(dirFullPath), name, true, false, ignoreRecursiveErr, false, []int32{wfs.signature})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(0).Infof("remove %s: %v", entryFullPath, err)
|
glog.V(0).Infof("remove %s: %v", entryFullPath, err)
|
||||||
if strings.Contains(err.Error(), filer.MsgFailDelNonEmptyFolder) {
|
if strings.Contains(err.Error(), filer.MsgFailDelNonEmptyFolder) {
|
||||||
|
|
Loading…
Reference in a new issue