Browse Source

avoid possible nil attributes

pull/2883/head
chrislu 3 years ago
parent
commit
3ab2c0e5c0
  1. 3
      weed/mount/weedfs.go

3
weed/mount/weedfs.go

@ -131,6 +131,9 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
}
var found bool
if fh, found = wfs.fhmap.FindFileHandle(inode); found {
if fh.entry.Attributes == nil {
fh.entry.Attributes = &filer_pb.FuseAttributes{}
}
return path, fh, fh.entry, fuse.OK
}
entry, status = wfs.maybeLoadEntry(path)

Loading…
Cancel
Save