- fixed configure.pl and makeDist.
[BackupPC.git] / lib / BackupPC / CGI / RestoreFile.pm
index 3188c1f..74501c8 100644 (file)
@@ -28,7 +28,7 @@
 #
 #========================================================================
 #
 #
 #========================================================================
 #
-# Version 2.1.0, released 20 Jun 2004.
+# Version 3.0.0alpha, released 23 Jan 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -150,7 +150,7 @@ sub restoreFile
     my $view = BackupPC::View->new($bpc, $host, \@Backups);
     my $a = $view->fileAttrib($num, $share, $dir);
     if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) {
     my $view = BackupPC::View->new($bpc, $host, \@Backups);
     my $a = $view->fileAttrib($num, $share, $dir);
     if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) {
-        ErrorExit("Can't restore bad file ${EscHTML($dir)}");
+        ErrorExit("Can't restore bad file ${EscHTML($dir)} ($num, $share, $dir)");
     }
     my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress});
     my $data;
     }
     my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress});
     my $data;
@@ -164,7 +164,6 @@ sub restoreFile
         }
        $f->close;
        $linkName =~ s/^\.\///;
         }
        $f->close;
        $linkName =~ s/^\.\///;
-       my $share = $1 if ( $dir =~ /^\/?(.*?)\// );
        restoreFile($host, $num, $share, $linkName, 1, $dir);
        return;
     }
        restoreFile($host, $num, $share, $linkName, 1, $dir);
        return;
     }