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:
John Starks
2016-03-30 12:38:03 -07:00
parent 8f9387ea7e
commit 424d62c72e
29 changed files with 126 additions and 81 deletions
+6
View File
@@ -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 {