Browse Source

mount: fix nil directory problem

pull/1165/head
Chris Lu 5 years ago
parent
commit
9c781da34a
  1. 4
      weed/filesys/dir.go

4
weed/filesys/dir.go

@ -186,7 +186,9 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
if err != nil {
return nil, err
}
dir.wfs.listDirectoryEntriesCache.Set(fullFilePath, entry, 5*time.Minute)
if entry != nil {
dir.wfs.listDirectoryEntriesCache.Set(fullFilePath, entry, 5*time.Minute)
}
} else {
glog.V(4).Infof("dir Lookup cache hit %s", fullFilePath)
}

Loading…
Cancel
Save