use absolute GzipTempDir
[BackupPC.git] / bin / BackupPC_burnArchiveCLI
index 3a6d8dc..4e2086b 100755 (executable)
@@ -6,7 +6,7 @@ use lib "/usr/local/BackupPC/lib";
 
 use DBI;
 use BackupPC::Lib;
-use BackupPC::SearchLib;
+use BackupPC::Search;
 use Time::HiRes qw/time/;
 use POSIX qw/strftime/;
 use Term::Menus;
@@ -23,7 +23,7 @@ $|=1;
 # don't check for user
 my $bpc = BackupPC::Lib->new(undef, undef, 1) || die;
 my %Conf = $bpc->Conf();
-%BackupPC::SearchLib::Conf = %Conf;
+%BackupPC::Search::Conf = %Conf;
 
 my $conf_bin;
 
@@ -52,8 +52,7 @@ my $user = $Conf{SearchUser} || '';
 
 my $dbh = DBI->connect($dsn, $user, "", { RaiseError => 1, AutoCommit => 1 });
 
-my $tar_dir = $Conf{InstallDir}.'/';
-$tar_dir .= $Conf{GzipTempDir} || die "GzipTempDir isn't defined in configuration";
+my $tar_dir = $Conf{GzipTempDir} || die "GzipTempDir isn't defined in configuration";
 
 die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir);
 
@@ -404,7 +403,7 @@ foreach my $copy_nr ( 1 .. $copies ) {
 
                        # this part
                        my $p = {
-                               filename => BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'}),
+                               filename => BackupPC::Search::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'}),
                                host => $row->{'host'},
                                share => $row->{'share'},
                                num => $row->{'num'}
@@ -585,7 +584,7 @@ SKIP:
 
 }
 
-#my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});
+#my $tar_file = BackupPC::Search::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});
 #print curr_time, sprintf(" %s:%s %-3d ", $row->{'host'}, $row->{'share'}, $row->{'num'}), " -> $tar_file ";
 
 print "Recoding finished, exiting...\n";