--- trunk/bin/BackupPC_updatedb 2005/07/31 20:53:40 34 +++ trunk/bin/BackupPC_updatedb 2005/07/31 21:03:36 35 @@ -204,7 +204,7 @@ print "\t$share"; $shareID = getShareID($share, $hostID, $hostname); - my ($f, $nf, $d, $nd) = recurseDir($bpc, $hostname, \@backups, $backupNum, $share, "", $shareID); + my ($f, $nf, $d, $nd) = recurseDir($bpc, $hostname, $files, $backupNum, $share, "", $shareID); print " $nf/$f files $nd/$d dirs\n"; $dbh->commit(); } @@ -276,7 +276,7 @@ #################################################### sub recurseDir($$$$$$$$) { - my ($bpc, $hostname, $backups, $backupNum, $share, $dir, $shareID) = @_; + my ($bpc, $hostname, $files, $backupNum, $share, $dir, $shareID) = @_; print STDERR "recurse($hostname,$backupNum,$share,$dir,$shareID)\n" if ($debug >= 1); @@ -285,7 +285,6 @@ { # scope my @stack; - my $files = BackupPC::View->new($bpc, $hostname, $backups, 1); my $filesInBackup = $files->dirAttrib($backupNum, $share, $dir); # first, add all the entries in current directory @@ -346,7 +345,7 @@ print STDERR "## STACK ",join(", ", @stack),"\n" if ($debug >= 2); while ( my $dir = shift @stack ) { - my ($f,$nf,$d,$nd) = recurseDir($bpc, $hostname, $backups, $backupNum, $share, $dir, $shareID); + my ($f,$nf,$d,$nd) = recurseDir($bpc, $hostname, $files, $backupNum, $share, $dir, $shareID); print STDERR "# $dir f: $f nf: $nf d: $d nd: $nd\n" if ($debug >= 1); $nr_files += $f; $new_files += $nf;