use absolute GzipTempDir
[BackupPC.git] / bin / BackupPC_incPartsUpdate
index 2a5913a..442c027 100755 (executable)
@@ -72,8 +72,8 @@ $pidfile->write;
 my $bpc = BackupPC::Lib->new || die "can't create BackupPC::Lib";
 my %Conf = $bpc->Conf();
 
-use BackupPC::SearchLib;
-%BackupPC::SearchLib::Conf = %Conf;
+use BackupPC::Search;
+%BackupPC::Search::Conf = %Conf;
 
 my $path = abs_path($0);
 $path =~ s#/[^/]+$#/#;
@@ -97,7 +97,7 @@ 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};
 
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
 
@@ -413,10 +413,10 @@ while (my $row = $sth->fetchrow_hashref) {
 
        $curr_backup++;
 
-       my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});
+       my $tar_file = BackupPC::Search::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});
 
        # this will return -1 if file doesn't exist
-       my $size = BackupPC::SearchLib::get_tgz_size_by_name($tar_file);
+       my $size = BackupPC::Search::get_tgz_size_by_name($tar_file);
 
        print "# host: ".$row->{host}.", share: ".$row->{'share'}.", backup_num:".$row->{num}." size: $size backup.size: ", $row->{inc_size},"\n" if ($opt{d});