Changeset 0e3de64 in lab.git for misc


Ignore:
Timestamp:
Jan 25, 2013 6:26:26 PM (12 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
2526624
Parents:
e4e7407
Message:
  • fix: previous procedure skips files such as '...'

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@193 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

Location:
misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • misc/findcombinable.pl

    re4e7407 r0e3de64  
    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)) { 
  • misc/findnonsjis.pl

    r89fbc5d r0e3de64  
    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.