X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FArchive.pm;h=f20bed3e8c4efaa84f157f2a9ad3a2c8e73fe7d4;hp=b235f9b0291ed389a3fe7b8a2ac64119b52ab5fe;hb=refs%2Ftags%2Fv3_2_0;hpb=8c30bb82b66f26ccf7e261e2c42711251d0d6ccd diff --git a/lib/BackupPC/CGI/Archive.pm b/lib/BackupPC/CGI/Archive.pm index b235f9b..f20bed3 100644 --- a/lib/BackupPC/CGI/Archive.pm +++ b/lib/BackupPC/CGI/Archive.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003 Craig Barratt +# Copyright (C) 2003-2009 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 @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0beta2, released 23 May 2004. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -225,12 +225,13 @@ EOF [ \%ArchiveReq], [qw(*ArchiveReq)]); $archive->Indent(1); - if ( open(REQ, ">$TopDir/pc/$archivehost/$reqFileName") ) { + my $openPath = "$TopDir/pc/$archivehost/$reqFileName"; + if ( open(REQ, ">", $openPath) ) { binmode(REQ); print(REQ $archive->Dump); close(REQ); } else { - ErrorExit($Lang->{Can_t_open_create} ); + ErrorExit(eval("qq{$Lang->{Can_t_open_create__openPath}}")); } $reply = $bpc->ServerMesg("archive $User $archivehost $reqFileName"); $str = eval("qq{$Lang->{Archive_requested}}");