diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2020-10-10 13:07:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-10 13:07:57 +0800 |
| commit | 411e49f96494629fa3da334e8dc7cc15bd4d19cd (patch) | |
| tree | 1756f0a2f86c871a6db67df7ecbd509c9df32233 /weed/filesys/dir.go | |
| parent | ac162fc85769cb1b2a1f8694f9644eae7d0ce6c8 (diff) | |
| parent | 4a15e9c830de1b654515308e5be8380ffa34aefa (diff) | |
| download | seaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.tar.xz seaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.zip | |
Merge pull request #23 from chrislusf/master
sync
Diffstat (limited to 'weed/filesys/dir.go')
| -rw-r--r-- | weed/filesys/dir.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 7d93dbd9f..4dede3a8b 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -82,9 +82,9 @@ func (dir *Dir) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *f func (dir *Dir) setRootDirAttributes(attr *fuse.Attr) { attr.Inode = 1 // filer2.FullPath(dir.Path).AsInode() attr.Valid = time.Hour - attr.Uid = dir.entry.Attributes.Uid - attr.Gid = dir.entry.Attributes.Gid - attr.Mode = os.FileMode(dir.entry.Attributes.FileMode) + attr.Uid = dir.wfs.option.MountUid + attr.Gid = dir.wfs.option.MountGid + attr.Mode = dir.wfs.option.MountMode attr.Crtime = dir.wfs.option.MountCtime attr.Ctime = dir.wfs.option.MountCtime attr.Mtime = dir.wfs.option.MountMtime @@ -354,7 +354,8 @@ func (dir *Dir) removeOneFile(req *fuse.RemoveRequest) error { func (dir *Dir) removeFolder(req *fuse.RemoveRequest) error { glog.V(3).Infof("remove directory entry: %v", req) - err := filer_pb.Remove(dir.wfs, dir.FullPath(), req.Name, true, false, false, false, []int32{dir.wfs.signature}) + ignoreRecursiveErr := true // ignore recursion error since the OS should manage it + err := filer_pb.Remove(dir.wfs, dir.FullPath(), req.Name, true, false, ignoreRecursiveErr, false, []int32{dir.wfs.signature}) if err != nil { glog.V(0).Infof("remove %s/%s: %v", dir.FullPath(), req.Name, err) if strings.Contains(err.Error(), "non-empty") { |
