From 69b6fa6318484bf89e8a72411946d8b4f08d5ffe Mon Sep 17 00:00:00 2001 From: naison <895703375@qq.com> Date: Sat, 3 Aug 2024 16:05:33 +0800 Subject: [PATCH] hotfix: fix interface conversion panic (#318) --- pkg/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/util.go b/pkg/util/util.go index a92d8e049..948fa7d22 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -297,7 +297,7 @@ func Merge[K comparable, V any](fromMap, ToMap map[K]V) map[K]V { func Move(src, dst string) error { err := os.Rename(src, dst) - if errors.Is(err.(*os.LinkError).Err.(syscall.Errno), syscall.EXDEV) { + if err != nil && errors.Is(err.(*os.LinkError).Err.(syscall.Errno), syscall.EXDEV) { return move(src, dst) } return err