Skip to content

Commit 1a419ef

Browse files
committed
Only read confusables source files ending in '.txt'
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. This requires #1216 to merge first.
1 parent e5b3407 commit 1a419ef

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)