$host:/$strippedShare$f | $In{hostDest}:/$strippedShareDest$targetFile |
EOF
}
- Header(eval("qq{$Lang->{Restore_Confirm_on__host}}"));
- print(eval("qq{$Lang->{Are_you_sure}}"));
+ my $content = eval("qq{$Lang->{Are_you_sure}}");
+ Header(eval("qq{$Lang->{Restore_Confirm_on__host}}"), $content);
Trailer();
} elsif ( $In{type} == 4 ) {
if ( !defined($Hosts->{$In{hostDest}}) ) {
@@ -231,6 +293,9 @@ EOF
$reqFileName = "restoreReq.$$.$i";
last if ( !-f "$TopDir/pc/$hostDest/$reqFileName" );
}
+ my $inPathHdr = $In{pathHdr};
+ $inPathHdr = "/$inPathHdr" if ( $inPathHdr !~ m{^/} );
+ $inPathHdr = "$inPathHdr/" if ( $inPathHdr !~ m{/$} );
my %restoreReq = (
# source of restore is hostSrc, #num, path shareSrc/pathHdrSrc
num => $In{num},
@@ -241,7 +306,7 @@ EOF
# destination of restore is hostDest:shareDest/pathHdrDest
hostDest => $hostDest,
shareDest => $In{shareDest},
- pathHdrDest => $In{pathHdr},
+ pathHdrDest => $inPathHdr,
# list of files to restore
fileList => \@fileList,
@@ -254,6 +319,8 @@ EOF
[ \%restoreReq],
[qw(*RestoreReq)]);
$dump->Indent(1);
+ mkpath("$TopDir/pc/$hostDest", 0, 0777)
+ if ( !-d "$TopDir/pc/$hostDest" );
if ( open(REQ, ">$TopDir/pc/$hostDest/$reqFileName") ) {
binmode(REQ);
print(REQ $dump->Dump);
@@ -264,8 +331,8 @@ EOF
$reply = $bpc->ServerMesg("restore ${EscURI($ipAddr)}"
. " ${EscURI($hostDest)} $User $reqFileName");
$str = eval("qq{$Lang->{Restore_requested_to_host__hostDest__backup___num}}");
- Header(eval("qq{$Lang->{Restore_Requested_on__hostDest}}"));
- print (eval("qq{$Lang->{Reply_from_server_was___reply}}"));
+ my $content = eval("qq{$Lang->{Reply_from_server_was___reply}}");
+ Header(eval("qq{$Lang->{Restore_Requested_on__hostDest}}"), $content);
Trailer();
}
}