X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FRestoreInfo.pm;h=0d43f240296b5c88b66bb4142419ab6ac98f86de;hp=93dacb61428713e6d6da9938ce2d7722bf43d194;hb=b81d2da5e16975674f011e4833337ac0fa24e0ea;hpb=2c14784ad71874ec850d189060fe63d6eb9eba95 diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm index 93dacb6..0d43f24 100644 --- a/lib/BackupPC/CGI/RestoreInfo.pm +++ b/lib/BackupPC/CGI/RestoreInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 8 Feb 2004. +# Version 3.0.0beta2, released 11 Nov 2006. # # See http://backuppc.sourceforge.net. # @@ -38,6 +38,7 @@ package BackupPC::CGI::RestoreInfo; use strict; use BackupPC::CGI::Lib qw(:all); +use Encode; sub action { @@ -79,11 +80,16 @@ sub action (my $strippedShareDest = $RestoreReq{shareDest}) =~ s/^\///; substr($targetFile, 0, length($RestoreReq{pathHdrSrc})) = $RestoreReq{pathHdrDest}; + $targetFile =~ s{//+}{/}g; + $strippedShareDest = decode_utf8($strippedShareDest); + $targetFile = decode_utf8($targetFile); + $strippedShareSrc = decode_utf8($strippedShareSrc); + $f = decode_utf8($f); $fileListStr .= <$RestoreReq{hostSrc}:/$strippedShareSrc$f$RestoreReq{hostDest}:/$strippedShareDest$targetFile EOF } - my $content = eval("qq{$Lang->{Restore___num_details_for__host2 }}"); + my $content = eval("qq{$Lang->{Restore___num_details_for__host2}}"); Header(eval("qq{$Lang->{Restore___num_details_for__host}}"),$content); Trailer(); }