From 0fdf7eca48892b5c6d12c1c96563755945331f16 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 1 Jul 2024 00:54:37 -0700 Subject: [PATCH] avoid possible nil case during other error cases --- weed/filer/filerstore_wrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filer/filerstore_wrapper.go b/weed/filer/filerstore_wrapper.go index d3beaba89..48e2a636d 100644 --- a/weed/filer/filerstore_wrapper.go +++ b/weed/filer/filerstore_wrapper.go @@ -182,7 +182,7 @@ func (fsw *FilerStoreWrapper) DeleteEntry(ctx context.Context, fp util.FullPath) }() existingEntry, findErr := fsw.FindEntry(ctx, fp) - if findErr == filer_pb.ErrNotFound { + if findErr == filer_pb.ErrNotFound || existingEntry == nil { return nil } if len(existingEntry.HardLinkId) != 0 {