Merge pull request #3 from mzihlmann/fix-broken-links

fix: cache extract fails on invalid symlinks
This commit is contained in:
mzihlmann 2025-05-24 21:04:51 +01:00 committed by GitHub
commit 403e688fae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 {