Commit e77a76da authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Paranoia: only look at file.GetAttr if it returned nonnil.

parent c58b6e5a
......@@ -519,8 +519,10 @@ func (me *memNode) Open(flags uint32, context *fuse.Context) (file fuse.File, co
func (me *memNode) GetAttr(file fuse.File, context *fuse.Context) (fi *os.FileInfo, code fuse.Status) {
var sz int64
if file != nil {
fi, _ := file.GetAttr()
sz = fi.Size
fi, code := file.GetAttr()
if code.Ok() {
sz = fi.Size
}
}
me.mutex.RLock()
defer me.mutex.RUnlock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment