aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-09-25 09:45:56 +0800
committerGitHub <noreply@github.com>2020-09-25 09:45:56 +0800
commit76e24a5660a2192603b7d6d84aef1924ab95cb94 (patch)
tree72e1b320c3487aa5f6cb3cd5fc849bfd94108ec8 /weed/filesys/wfs.go
parent48c578410fea2128f81356250b2cd9d56074d878 (diff)
parent043b0631369bec00b33eb53cdf2cdef3eced006c (diff)
downloadseaweedfs-76e24a5660a2192603b7d6d84aef1924ab95cb94.tar.xz
seaweedfs-76e24a5660a2192603b7d6d84aef1924ab95cb94.zip
Merge pull request #20 from chrislusf/master
sync
Diffstat (limited to 'weed/filesys/wfs.go')
-rw-r--r--weed/filesys/wfs.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index fa491138e..ef31a9258 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -206,8 +206,14 @@ func (wfs *WFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.
}
func (wfs *WFS) mapPbIdFromFilerToLocal(entry *filer_pb.Entry) {
+ if entry.Attributes == nil {
+ return
+ }
entry.Attributes.Uid, entry.Attributes.Gid = wfs.option.UidGidMapper.FilerToLocal(entry.Attributes.Uid, entry.Attributes.Gid)
}
func (wfs *WFS) mapPbIdFromLocalToFiler(entry *filer_pb.Entry) {
+ if entry.Attributes == nil {
+ return
+ }
entry.Attributes.Uid, entry.Attributes.Gid = wfs.option.UidGidMapper.LocalToFiler(entry.Attributes.Uid, entry.Attributes.Gid)
}