Skip to content

Commit

Permalink
fix symlink when it has changed file pointer after build
Browse files Browse the repository at this point in the history
  • Loading branch information
zuzuleinen committed Dec 19, 2022
1 parent b388102 commit 686e946
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bobtask/artifact_extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (t *Task) ArtifactExtract(artifactName hash.In, invalidFiles map[string][]t

// symlink
if archiveFile.FileInfo.Mode()&os.ModeSymlink == os.ModeSymlink {
os.RemoveAll(dst)
err = os.Symlink(header.Linkname, dst)
errz.Fatal(err)
continue
Expand Down Expand Up @@ -131,7 +132,7 @@ func shouldFetchFromCache(filename string, invalidFiles map[string][]target.Reas
return false
}
for _, reason := range invalidFiles[filename] {
if reason == target.ReasonHashChanged || reason == target.ReasonMissing {
if reason == target.ReasonSizeChanged || reason == target.ReasonHashChanged || reason == target.ReasonMissing {
return true
}
}
Expand Down

0 comments on commit 686e946

Please sign in to comment.