/[BackupPC]/trunk/bin/BackupPC_updatedb
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_updatedb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 311 by dpavlin, Sun Jan 29 14:54:17 2006 UTC revision 315 by dpavlin, Sun Jan 29 18:08:52 2006 UTC
# Line 15  use BackupPC::SearchLib; Line 15  use BackupPC::SearchLib;
15  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
16    
17  use constant BPC_FTYPE_DIR => 5;  use constant BPC_FTYPE_DIR => 5;
18  use constant EST_CHUNK => 100000;  use constant EST_CHUNK => 4096;
19    
20  # daylight saving time change offset for 1h  # daylight saving time change offset for 1h
21  my $dst_offset = 60 * 60;  my $dst_offset = 60 * 60;
# Line 186  sub hest_update { Line 186  sub hest_update {
186                          print " - no new files\n";                          print " - no new files\n";
187                          return;                          return;
188                  } else {                  } else {
189                          print " - $results files: ";                          print "...";
190                  }                  }
191    
192                  sub fmt_date {                  sub fmt_date {
# Line 198  sub hest_update { Line 198  sub hest_update {
198    
199                  while (my $row = $sth->fetchrow_hashref()) {                  while (my $row = $sth->fetchrow_hashref()) {
200    
201                          my $fid = $row->{'fid'} || die "no fid?";                          my $uri = $row->{hname} . ':' . $row->{sname} . '#' . $row->{backupnum} . ' ' . $row->{filepath};
                         my $uri = 'file:///' . $fid;  
   
202                          unless ($skip_check) {                          unless ($skip_check) {
203                                  my $id = $hest_node->uri_to_id($uri);                                  my $id = $hest_node->uri_to_id($uri);
204                                  next if ($id && $id == -1);                                  next if ($id && $id == -1);
# Line 236  sub hest_update { Line 234  sub hest_update {
234                          $added++;                          $added++;
235                  }                  }
236    
237                  print " $added";                  print "$added";
238    
239                  $offset += EST_CHUNK;                  $offset += EST_CHUNK;
240    

Legend:
Removed from v.311  
changed lines
  Added in v.315

  ViewVC Help
Powered by ViewVC 1.1.26