From 9df1547fce6feaf801ff2b60452cb9f3e84627ad Mon Sep 17 00:00:00 2001 From: apex Date: Sat, 28 Jun 2025 13:15:10 -0400 Subject: [PATCH] fixed a edge case bug where existence check would succed even when it shouldnt when using the trie --- gendictionary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gendictionary.js b/gendictionary.js index e02f6fe..0446a63 100644 --- a/gendictionary.js +++ b/gendictionary.js @@ -21,7 +21,7 @@ reader.on('line', (line) => { let entry = JSON.parse(line); let thispath = path + getPath(entry.word) + entry.pos + "/"; console.log(thispath); - if (!fs.existsSync(thispath)) { + if (!fs.existsSync(thispath + "definitions.json")) { initializeDir(thispath); } // console.log(entry);