From bb2bb2fcb0abc3cba18e935cde98693351db0fa7 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Sun, 9 Mar 2025 00:32:35 +0800 Subject: [PATCH] fix: Fix problematic error returns Signed-off-by: cuishuang --- pkg/util/disk/mount_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/disk/mount_helper.go b/pkg/util/disk/mount_helper.go index ffb84fcaca..1185d534c9 100644 --- a/pkg/util/disk/mount_helper.go +++ b/pkg/util/disk/mount_helper.go @@ -114,7 +114,7 @@ func UnmountPath(logger *zap.SugaredLogger, mountPath string, mounter mount.Inte } notMnt, mntErr := mounter.IsLikelyNotMountPoint(mountPath) if mntErr != nil { - return err + return mntErr } if notMnt { logger.With("mount path", mountPath).Info("Mount path is unmounted. Removing directory.")