28 |
# |
# |
29 |
#======================================================================== |
#======================================================================== |
30 |
# |
# |
31 |
# Version 2.1.0, released 20 Jun 2004. |
# Version 2.1.2, released 5 Sep 2005. |
32 |
# |
# |
33 |
# See http://backuppc.sourceforge.net. |
# See http://backuppc.sourceforge.net. |
34 |
# |
# |
150 |
my $view = BackupPC::View->new($bpc, $host, \@Backups); |
my $view = BackupPC::View->new($bpc, $host, \@Backups); |
151 |
my $a = $view->fileAttrib($num, $share, $dir); |
my $a = $view->fileAttrib($num, $share, $dir); |
152 |
if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) { |
if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) { |
153 |
ErrorExit("Can't restore bad file ${EscHTML($dir)}"); |
ErrorExit("Can't restore bad file ${EscHTML($dir)} ($num, $share, $dir)"); |
154 |
} |
} |
155 |
my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress}); |
my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress}); |
156 |
my $data; |
my $data; |
164 |
} |
} |
165 |
$f->close; |
$f->close; |
166 |
$linkName =~ s/^\.\///; |
$linkName =~ s/^\.\///; |
|
my $share = $1 if ( $dir =~ /^\/?(.*?)\// ); |
|
167 |
restoreFile($host, $num, $share, $linkName, 1, $dir); |
restoreFile($host, $num, $share, $linkName, 1, $dir); |
168 |
return; |
return; |
169 |
} |
} |