X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_checkArchiveConsistency;h=7b7c1f8cf7c55fbf4fd3dfdd84c17cf7b5d474f3;hp=2a9b6293eeda62a8972e4d0ef37f60c055009e59;hb=488bb662f6d144d42376b3d14e9b1e438e00e6f8;hpb=ad8b6832fb9669c60644fd7d0a7d294828f6931c diff --git a/bin/BackupPC_checkArchiveConsistency b/bin/BackupPC_checkArchiveConsistency index 2a9b629..7b7c1f8 100755 --- a/bin/BackupPC_checkArchiveConsistency +++ b/bin/BackupPC_checkArchiveConsistency @@ -2,7 +2,7 @@ use strict; no utf8; -use lib "/data/backuppc-agi//lib"; +use lib "/usr/local/BackupPC/lib"; use DBI; use BackupPC::Lib; @@ -12,7 +12,7 @@ my %Conf = $bpc->Conf(); my $dsn = $Conf{SearchDSN} || die "need searchdsn in config.pl\n"; my $user = $Conf{SearchUser} || ''; my $dbh = DBI->connect($dsn, $user, "", { raiseerror => 1, autocommit => 0 }); -my $tar_dir = $Conf{InstallDir}.'/'.$Conf{GzipTempDir}; +my $tar_dir = $Conf{GzipTempDir}; my $dvd_nr = $ARGV[0]; if (!defined($dvd_nr)) { @@ -33,7 +33,7 @@ my $sth = $dbh->prepare($sql); $sth->execute($dvd_nr); while (my $row = $sth->fetchrow_hashref()) { my $host_share = $row->{share}; - $host_share =~ s/(.*?):(.*)/$1_$2_/gi; + $host_share =~ s/(.*?):\/?(.*)/$1_$2_/gi; my $filename = $tar_dir."/".$host_share . $row->{num}.".tar.gz"; my (undef, undef, undef, undef, undef, undef, undef, $fs_size, undef, undef, undef, undef, undef) = stat($filename); print "checking $filename...";