summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
Diffstat (limited to 'enc')
-rw-r--r--enc/trans/make_transdb.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/enc/trans/make_transdb.rb b/enc/trans/make_transdb.rb
index 752e74624d..bbb7a9be6c 100644
--- a/enc/trans/make_transdb.rb
+++ b/enc/trans/make_transdb.rb
@@ -13,7 +13,7 @@ outhdr = transdirs.shift || 'transdb.h'
transdirs << 'enc/trans' if transdirs.empty?
transdirs = transdirs.sort_by {|td|
- td.length
+ -td.length
}.inject([]) {|tds, td|
next tds unless File.directory?(td)
tds << td if tds.all? {|td2| !File.identical?(td2, td) }
@@ -21,9 +21,10 @@ transdirs = transdirs.sort_by {|td|
}
files = {}
+names_t = []
transdirs.each do |transdir|
names = Dir.entries(transdir)
- names_t = names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact
+ names_t += names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact
names_c = names.map {|n| /(?!\A)\.c\z/ =~ n ? $` : nil }.compact
(names_t & names_c).map {|n|
"#{n}.c"