fix shares which start with slash /
[BackupPC.git] / bin / BackupPC_checkArchiveConsistency
index 2a9b629..169d0d3 100755 (executable)
@@ -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;
 
@@ -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...";