Skip to content

Commit

Permalink
Preserve binary access/modification time
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Nov 2, 2024
1 parent 16e2ff1 commit 2ac7235
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ func (t *Tool) Extract() error {
return fmt.Errorf("saveBinary: %w", err)
}

err = os.Chtimes(t.Asset.Destination, hdr.AccessTime, hdr.ModTime)
if err != nil {
return fmt.Errorf("os.Chtimes: %w", err)
}

found = true

break
Expand Down

0 comments on commit 2ac7235

Please sign in to comment.