checker
changeset 17 0e5a8a5f4674
parent 14 73b95264a70c
equal deleted inserted replaced
16:867424a1db61 17:0e5a8a5f4674
    65 
    65 
    66 sub get_block_list {
    66 sub get_block_list {
    67     my $dir = shift;
    67     my $dir = shift;
    68     my %block;
    68     my %block;
    69     find(sub {
    69     find(sub {
    70 	(-f) and (-M > 0) or return;
    70 	(-f) or return;	# we need to include the tmp files!
    71 	#verbose("idx: $File::Find::name");
       
    72 	push @{$block{""}}, abs_path $_;
    71 	push @{$block{""}}, abs_path $_;
    73 	foreach my $f (get_file_list($_)) {
    72 	foreach my $f (get_file_list($_)) {
    74 	    push @{$block{$f}} => $#{$block{""}};
    73 	    push @{$block{$f}} => $#{$block{""}};
    75 	}
    74 	}
    76     }, "$dir/idx");
    75     }, "$dir/idx");
   107     $SIG{ALRM}->();
   106     $SIG{ALRM}->();
   108 
   107 
   109     my @unused;
   108     my @unused;
   110     find(sub {
   109     find(sub {
   111 	$done++ if -f;
   110 	$done++ if -f;
   112 	(-f _) and ((-M _) > 0) or return;
   111 	(-f _) and ((-M _) > 0) or return;  # don't process the fresh blocks
   113 
   112 
   114 	# we don't need uncompressed files if an compressed version
   113 	# we don't need uncompressed files if an compressed version
   115 	# exists
   114 	# exists
   116 	unlink $_ and return if -f "$_.gz";
   115 	unlink $_ and return if -f "$_.gz";
   117 
   116