print "$me: removing data from pruned files\n" if $verbose;
$db->remove_unused();
}
+ print "$me: analyzing db\n" if $verbose;
+ $db->analyze();
}
sub wanted
sub prune
{
my $dir=shift;
+ $dir=Cwd::abs_path($dir);
return unless(opendir(DIR, $dir));
+ my $base=Cwd::abs_path($db->base_dir());
+ $dir=~s/^$base\/?//;
my @oldfiles=$db->files_in($dir);
my @newfiles=grep { !/^\.\.?$/; } readdir(DIR);
closedir(DIR);
{
unless(exists($hash{$file}))
{
- # FIXME: add path, rebasify
$files_pruned=1;
- $db->unindex($file);
+ $db->unindex($dir, $file);
}
}
}