mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-20 03:59:49 +08:00
revert "POSIX: should not delete if a directory is not empty"
revert0c75f15062Reported: Hi, about commit:0c75f15062POSIX: should not delete if a directory is not empty It should still delete with a command like rm -rf "${path}"/ because it is a forced delete, but now it gets fail to delete non-empty folder: [...] Can you enable the delete if it is forced?
This commit is contained in:
@@ -491,8 +491,8 @@ func (dir *Dir) removeFolder(entry *filer_pb.Entry, req *fuse.RemoveRequest) err
|
|||||||
dirFullPath := dir.FullPath()
|
dirFullPath := dir.FullPath()
|
||||||
|
|
||||||
glog.V(3).Infof("remove directory entry: %v", req)
|
glog.V(3).Infof("remove directory entry: %v", req)
|
||||||
ignoreRecursiveErr := false // ignore recursion error since the OS should manage it
|
ignoreRecursiveErr := true // ignore recursion error since the OS should manage it
|
||||||
err := filer_pb.Remove(dir.wfs, dirFullPath, req.Name, true, false, ignoreRecursiveErr, false, []int32{dir.wfs.signature})
|
err := filer_pb.Remove(dir.wfs, dirFullPath, req.Name, true, true, ignoreRecursiveErr, false, []int32{dir.wfs.signature})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(0).Infof("remove %s/%s: %v", dirFullPath, req.Name, err)
|
glog.V(0).Infof("remove %s/%s: %v", dirFullPath, req.Name, err)
|
||||||
if strings.Contains(err.Error(), filer.MsgFailDelNonEmptyFolder) {
|
if strings.Contains(err.Error(), filer.MsgFailDelNonEmptyFolder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user