Browse Source

ensure entry attribute is not nill

fix https://github.com/chrislusf/seaweedfs/issues/1926
pull/1943/head
Chris Lu 4 years ago
parent
commit
df461402cc
  1. 3
      weed/filesys/file.go

3
weed/filesys/file.go

@ -280,6 +280,9 @@ func (file *File) maybeLoadEntry(ctx context.Context) (entry *filer_pb.Entry, er
return entry, err
}
if entry != nil {
if entry.Attributes == nil {
entry.Attributes = &filer_pb.FuseAttributes{}
}
file.setEntry(entry)
} else {
glog.Warningf("maybeLoadEntry not found entry %s/%s: %v", file.dir.FullPath(), file.Name, err)

Loading…
Cancel
Save