diff options
Diffstat (limited to 'enc')
-rwxr-xr-x | enc/make_encdb.rb | 1 | ||||
-rw-r--r-- | enc/trans/make_transdb.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/enc/make_encdb.rb b/enc/make_encdb.rb index 41e9a91293..5a420aed32 100755 --- a/enc/make_encdb.rb +++ b/enc/make_encdb.rb @@ -27,6 +27,7 @@ outhdr = encdirs.shift || 'encdb.h' encdirs << 'enc' if encdirs.empty? files = {} encdirs.each do |encdir| + next unless File.directory?(encdir) Dir.open(encdir) {|d| d.grep(/.+\.[ch]\z/)}.sort_by {|e| e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten }.each do |fn| diff --git a/enc/trans/make_transdb.rb b/enc/trans/make_transdb.rb index 4cadfdeeb3..20c3a7157a 100644 --- a/enc/trans/make_transdb.rb +++ b/enc/trans/make_transdb.rb @@ -13,6 +13,7 @@ outhdr = transdirs.shift || 'transdb.h' transdirs << 'enc/trans' if transdirs.empty? files = {} transdirs.each do |transdir| + next unless File.directory?(transdir) Dir.open(transdir) {|d| d.grep(/.+\.[ch]\z/).reject {|n| /\.erb\.c\z/ =~ n }}.sort_by {|e| e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten }.each do |fn| |