mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-05 16:47:31 -04:00
Use existing PAX headers for time
This removes the MSWINDOWS.* time fields and uses PAX times directly. I didn't previously realize that PAX times could be negative, which eliminates the need to store Windows times in a different format. This also uses the LIBARCHIVE.creationtime field for creation times to match OS X behavior.
This commit is contained in:
@@ -302,6 +302,12 @@ func mergePAX(hdr *Header, headers map[string]string) error {
|
||||
return err
|
||||
}
|
||||
hdr.ChangeTime = t
|
||||
case paxCreationTime:
|
||||
t, err := parsePAXTime(v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
hdr.CreationTime = t
|
||||
case paxSize:
|
||||
size, err := strconv.ParseInt(v, 10, 0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user