fix directory lookup nil

This commit is contained in:
Chris Lu
2020-02-25 11:13:06 -08:00
parent e86da5a491
commit 7d10fdf737
8 changed files with 22 additions and 8 deletions

View File

@@ -229,7 +229,7 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
return node, nil
}
glog.V(1).Infof("not found dir GetEntry %s: %v", fullFilePath, err)
glog.V(4).Infof("not found dir GetEntry %s: %v", fullFilePath, err)
return nil, fuse.ENOENT
}
@@ -276,6 +276,9 @@ func (dir *Dir) removeOneFile(ctx context.Context, req *fuse.RemoveRequest) erro
if err != nil {
return err
}
if entry == nil {
return nil
}
dir.wfs.deleteFileChunks(ctx, entry.Chunks)