From 738247d47ebd981fb69410f080c3cbf2e7a6edd2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 2 Dec 2018 23:20:29 -0800 Subject: [PATCH] do not throw error if not found --- weed/server/filer_grpc_server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index 42069c54c..03ed3e740 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -20,6 +20,9 @@ import ( func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.LookupDirectoryEntryRequest) (*filer_pb.LookupDirectoryEntryResponse, error) { entry, err := fs.filer.FindEntry(filer2.FullPath(filepath.Join(req.Directory, req.Name))) + if err == filer2.ErrNotFound { + return nil, nil + } if err != nil { return nil, fmt.Errorf("%s not found under %s: %v", req.Name, req.Directory, err) }