diff options
author | John Fultz <jfultz@wolfram.com> | 2019-07-21 23:52:20 -0700 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2019-07-21 23:52:20 -0700 |
commit | e29118f4a6e310d879f1bc696f7f4d4e489839fe (patch) | |
tree | b2623535560486323fed6b6076c1285ac7331cf2 /datamanager.cpp | |
parent | d6b26e81ce95daa964247c1726cef242f739a1ec (diff) |
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.
Diffstat (limited to 'datamanager.cpp')
-rw-r--r-- | datamanager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |