--- trunk/bin/BackupPC_updatedb 2005/08/28 17:04:12 89 +++ trunk/bin/BackupPC_updatedb 2005/08/28 18:02:58 92 @@ -89,7 +89,7 @@ my ($host_id, $share_id, $num) = @_; - print curr_time," updating HyperEstraier: files"; + print curr_time," updating HyperEstraier: select files"; my $t = time(); @@ -113,7 +113,7 @@ -- files.name AS filename, files.path AS filepath, files.date AS date, - files.type AS filetype, + files.type AS type, files.size AS size, files.shareid AS shareid, backups.date AS backup_date @@ -128,7 +128,7 @@ my $results = $sth->rows; if ($results == 0) { - print " no files\n"; + print " - no files, skipping\n"; return; } @@ -145,7 +145,7 @@ my $max = int($results / $dot); - print " index $index_path..."; + print ", opening index $index_path..."; use HyperEstraier; my $db = HyperEstraier::Database->new(); @@ -165,7 +165,8 @@ my $fid = $row->{'fid'} || die "no fid?"; my $uri = 'file:///' . $fid; - next if ($db->uri_to_id($uri)); + my $id = $db->uri_to_id($uri); + next unless ($id == -1); # create a document object my $doc = HyperEstraier::Document->new; @@ -200,7 +201,7 @@ print "sync $added new files"; $db->sync(); - print " close"; + print ", close"; $db->close(); my $dur = (time() - $t) || 1;