sub restore_increment {
my $path = shift || die "need path!";
+ if ($path !~ m/\.tar\.gz$/i) {
+ print "skipping $path, not .tar.gz increment\n";
+ return;
+ }
+
print "working on $path\n";
if (-e $restore_path) {
restore_increment( $File::Find::name );
}, follow => 0 }, $restore_inc);
- } elsif (-f $restore_inc && $restore_inc =~ m/\.tar\.gz$/i) {
+ } elsif (-f $restore_inc) {
restore_increment( $restore_inc );
} else {
- warn "skipped: $restore_inc, not directory or .tar.gz increment\n";
+ warn "skipped: $restore_inc, not file or directory\n";
}
}