X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_zipCreate;h=bebea7ac1fb8b45f47e1284c6f84f33a59aa790d;hp=973995e3bda238ec1d059c8a0f5240573a74a76d;hb=e951f787a66c5bd9e9955c3f657a5b44289c0fe1;hpb=79e0593c501fd58046feeca20c315cc4ac283435 diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index 973995e..bebea7a 100755 --- a/bin/BackupPC_zipCreate +++ b/bin/BackupPC_zipCreate @@ -51,7 +51,7 @@ # #======================================================================== # -# Version 2.1.0beta2, released 23 May 2004. +# Version 2.1.0, released 20 Jun 2004. # # See http://backuppc.sourceforge.net. # @@ -271,8 +271,14 @@ sub ZipWriteFile } return if ( !$zipmember ); - # Set the attributes and permissions - $zipmember->setLastModFileDateTimeFromUnix($hdr->{mtime}); + # + # Set the attributes and permissions. The standard zip file + # header cannot handle dates prior to 1/1/1980, or 315561600 + # unix seconds, so we round up the mtime. + # + my $mtime = $hdr->{mtime}; + $mtime = 315561600 if ( $mtime < 315561600 ); + $zipmember->setLastModFileDateTimeFromUnix($mtime); $zipmember->unixFileAttributes($hdr->{mode}); # Zip files don't accept uid and gid, so we put them in the comment field. $zipmember->fileComment("uid=".$hdr->{uid}." gid=".$hdr->{gid})