mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid possible nil attributes
This commit is contained in:
parent
9d44b89c21
commit
3ab2c0e5c0
|
@ -131,6 +131,9 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
|
||||||
}
|
}
|
||||||
var found bool
|
var found bool
|
||||||
if fh, found = wfs.fhmap.FindFileHandle(inode); found {
|
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
|
return path, fh, fh.entry, fuse.OK
|
||||||
}
|
}
|
||||||
entry, status = wfs.maybeLoadEntry(path)
|
entry, status = wfs.maybeLoadEntry(path)
|
||||||
|
|
Loading…
Reference in a new issue