projects
/
id3fs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix pruning tags + only prune files/dirs under @ARGV
[id3fs.git]
/
bin
/
id3fs-index
diff --git
a/bin/id3fs-index
b/bin/id3fs-index
index
631bd63
..
4ee56e5
100755
(executable)
--- a/
bin/id3fs-index
+++ b/
bin/id3fs-index
@@
-16,6
+16,7
@@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+use lib '/home/ianb/projects/id3fs/id3fs/lib'; # FIXME: remove
use strict;
use Getopt::Long qw(Configure);
use ID3FS::DB;
use strict;
use Getopt::Long qw(Configure);
use ID3FS::DB;
@@
-74,7
+75,7
@@
else
$db->last_update(time());
my $base=$db->base_dir();
my $abs_base=Cwd::abs_path($base);
$db->last_update(time());
my $base=$db->base_dir();
my $abs_base=Cwd::abs_path($base);
-
while(my $path=shift
)
+
for my $path (@ARGV
)
{
if(Cwd::abs_path($path) !~ /^$abs_base/)
{
{
if(Cwd::abs_path($path) !~ /^$abs_base/)
{
@@
-82,7
+83,7
@@
else
}
File::Find::find( {wanted => \&wanted, follow => 1, no_chdir => 1}, $path);
}
}
File::Find::find( {wanted => \&wanted, follow => 1, no_chdir => 1}, $path);
}
- my $directories_pruned=$db->prune_directories();
+ my $directories_pruned=$db->prune_directories(
@ARGV
);
if($files_pruned || $directories_pruned)
{
print "$me: pruning removed files from db\n" if $verbose;
if($files_pruned || $directories_pruned)
{
print "$me: pruning removed files from db\n" if $verbose;