Changeset 193 in lab


Ignore:
Timestamp:
Jan 25, 2013 6:26:26 PM (11 years ago)
Author:
mitty
Message:
  • fix: previous procedure skips files such as '...'
Location:
trunk/misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/misc/findcombinable.pl

    r192 r193  
    3333    print STDERR "checking '$target'\n"; 
    3434    opendir(my $dir, $target) || return $target; 
    35     my @entries = sort readdir($dir); 
     35    my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir); 
    3636    closedir($dir); 
    3737     
    3838    my @dirs; 
    3939    while (my $entry = shift @entries) { 
    40         next if ($entry =~ /^\.+$/); 
    4140        $entry = $utf8->decode($entry); 
    4241        if (match($entry)) { 
  • trunk/misc/findnonsjis.pl

    r191 r193  
    3030    print STDERR "checking '$target'\n"; 
    3131    opendir(my $dir, $target) || return $target; 
    32     my @entries = sort readdir($dir); 
     32    my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir); 
    3333    closedir($dir); 
    3434     
    3535    my @dirs; 
    3636    while (my $entry = shift @entries) { 
    37         next if ($entry =~ /^\.+$/); 
    3837        if (match($entry)) { 
    3938            print "'$target/$entry' contains non Shift_JIS character\n"; 
Note: See TracChangeset for help on using the changeset viewer.