Skip to content

Commit

Permalink
fix: restore modified time from Git
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed May 27, 2024
1 parent 0c2be4e commit 6d8e625
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ func Unzip(r *zip.Reader, dest string) error {
if err != nil {
return fmt.Errorf(errorFormat, err)
}

// Restore the modified time
if err := os.Chtimes(fpath, f.Modified, f.Modified); err != nil {
return fmt.Errorf(errorFormat, err)
}
}

return nil
Expand Down

0 comments on commit 6d8e625

Please sign in to comment.