From e29118f4a6e310d879f1bc696f7f4d4e489839fe Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sun, 21 Jul 2019 23:52:20 -0700 Subject: Clean up duplicate strategy files. There's only two distinct superleaves files, but there were more copies in the layout and it's a huge file. Now, lexica beginning with the text "csw" will fall back to the strategy files in the "csw" directory before going to default_english. And so, the Collins superleaves is in strategy/csw and other dictionaries default directly to strategy/default_english. Also clean up dupes of other files which didn't take much space, but at least it clarifies what strategy files are unique. Minor change to the C++ code to detect the "csw" directory. --- datamanager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'datamanager.cpp') diff --git a/datamanager.cpp b/datamanager.cpp index 55d1166..ecfeedc 100644 --- a/datamanager.cpp +++ b/datamanager.cpp @@ -139,6 +139,8 @@ string DataManager::findDataFile(const string &subDirectory, const string &lexic string fname = makeDataFilename(subDirectory, lexicon, file, true); if (!fileExists(fname)) fname = makeDataFilename(subDirectory, lexicon, file, false); + if (!fileExists(fname) && lexicon.substr(0,3) == "csw") + fname = makeDataFilename(subDirectory, "csw", file, false); if (!fileExists(fname)) fname = makeDataFilename(subDirectory, m_backupLexicon, file, false); if (!fileExists(fname)) -- cgit v1.2.3