Changeset 0e3de64 in lab.git for misc/findnonsjis.pl


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.