Skip to content

Commit

Permalink
hotfix: fix interface conversion panic (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
wencaiwulue authored Aug 3, 2024
1 parent 63be89b commit 69b6fa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69b6fa6

Please sign in to comment.