X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_zipCreate;h=e795592e859482c3cbe0e93a79e763d329b80853;hp=2a01965df90d29c4865ce9f0c16aaf57dd71ebf3;hb=07d524e222fd3eeffccd2355f4a20ca5eba82f1b;hpb=2c14784ad71874ec850d189060fe63d6eb9eba95 diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index 2a01965..e795592 100755 --- a/bin/BackupPC_zipCreate +++ b/bin/BackupPC_zipCreate @@ -51,7 +51,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 8 Feb 2004. +# Version 2.1.0beta2, released 23 May 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})