Skip to content

Commit df99791

Browse files
authored
Only read confusables source files ending in '.txt' (#1217)
The confusables tool used to read every data file in certain directories, even if they were backup files ending in '.txt~'. Now we restrict it only to '.txt' files.
1 parent 69fe14a commit df99791

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unicodetools/src/main/java/org/unicode/text/UCD/GenerateConfusables.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,8 @@ private static void generateConfusables(
22732273
if (new File(indir, names[i]).isDirectory()) {
22742274
continue;
22752275
}
2276-
if (!names[i].startsWith("confusables-")) {
2276+
// Skip files not matching "confusables-*.txt"
2277+
if (!names[i].startsWith("confusables-") || !names[i].endsWith(".txt")) {
22772278
continue;
22782279
}
22792280
if (DEBUG) System.out.println(names[i]);

0 commit comments

Comments
 (0)