From 3cd564a735560ad0eccb81d1bcef22db90ec939a Mon Sep 17 00:00:00 2001 From: Martin Zihlmann Date: Sat, 22 Mar 2025 23:06:55 +0000 Subject: [PATCH] fix: cache extract fails on invalid symlinks --- pkg/util/fs_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index c8d5a613aa..dc4b062512 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -843,7 +843,7 @@ func Volumes() []string { func MkdirAllWithPermissions(path string, mode os.FileMode, uid, gid int64) error { // Check if a file already exists on the path, if yes then delete it - info, err := os.Stat(path) + info, err := os.Lstat(path) if err == nil && !info.IsDir() { logrus.Tracef("Removing file because it needs to be a directory %s", path) if err := os.Remove(path); err != nil {