X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FBackupPC%2FFileZIO.pm;h=4bae50a0ce97572309466fa018ae4e38b8b8c1de;hb=329e870f56fb6572fa697998d33676588034c149;hp=48554b86b604876d98df1e3a93c3a83706066309;hpb=7dee89bfce659051d486cc66515bb7f22bbc4f09;p=BackupPC.git diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm index 48554b8..4bae50a 100644 --- a/lib/BackupPC/FileZIO.pm +++ b/lib/BackupPC/FileZIO.pm @@ -11,7 +11,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001 Craig Barratt +# Copyright (C) 2001-2003 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0beta1, released 30 Mar 2003. +# Version 2.1.0_CVS, released 3 Jul 2003. # # See http://backuppc.sourceforge.net. # @@ -99,6 +99,7 @@ sub open } else { open(FH, "<", $fileName) || return; } + binmode(FH); $fh = *FH; } $compLevel = 0 if ( !$CompZlibOK ); @@ -353,6 +354,7 @@ sub compressCopy my $fh = BackupPC::FileZIO->open($destFileZ, 1, $compress); my $data; if ( defined($fh) && open(LOG, "<", $srcFile) ) { + binmode(LOG); while ( sysread(LOG, $data, 65536) > 0 ) { $fh->write(\$data); }