From e439e33888c8b643c0351448a6a932bd3bfe5d88 Mon Sep 17 00:00:00 2001 From: "steve.wei" Date: Fri, 26 Dec 2025 03:28:31 +0800 Subject: [PATCH] fix(filer): check error from FindEntry (#7878) * fix(filer): check error from FindEntry * remove --------- Co-authored-by: Chris Lu --- weed/filer/filer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 382eb644f..b3114d112 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -2,6 +2,7 @@ package filer import ( "context" + "errors" "fmt" "os" "sort" @@ -262,7 +263,10 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di // check the store directly glog.V(4).InfofCtx(ctx, "find uncached directory: %s", dirPath) - dirEntry, _ := f.FindEntry(ctx, util.FullPath(dirPath)) + dirEntry, findErr := f.FindEntry(ctx, util.FullPath(dirPath)) + if findErr != nil && !errors.Is(findErr, filer_pb.ErrNotFound) { + return findErr + } // no such existing directory if dirEntry == nil {