filer: no entry if not found

This commit is contained in:
Chris Lu
2020-01-15 19:08:54 -08:00
parent e4b660699f
commit 230a0e4a33
2 changed files with 4 additions and 8 deletions

View File

@@ -184,7 +184,8 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
entry, err = filer2.GetEntry(ctx, dir.wfs, fullFilePath)
if err != nil {
return nil, err
glog.V(1).Infof("dir GetEntry %s: %v", fullFilePath, err)
return nil, fuse.ENOENT
}
if entry != nil {
dir.wfs.listDirectoryEntriesCache.Set(fullFilePath, entry, 5*time.Minute)
@@ -390,9 +391,6 @@ func (dir *Dir) maybeLoadEntry(ctx context.Context) error {
if err != nil {
return err
}
if entry == nil {
return fuse.ENOENT
}
dir.entry = entry
}
return nil