-rw-r--r-- | library/global.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/library/global.cpp b/library/global.cpp index f7a0767..7bdd0b1 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -237,24 +237,23 @@ const QDawg& Global::fixedDawg() if ( !dawgfile.exists() ) { QString fn = dictDir() + "/words"; if ( QFile::exists(words_lang) ) fn = words_lang; QFile in(fn); if ( in.open(IO_ReadOnly) ) { fixed_dawg->createFromWords(&in); - dawgfile.open(IO_WriteOnly); + if (dawgfile.open(IO_WriteOnly)) fixed_dawg->write(&dawgfile); dawgfile.close(); } - } else { + } else fixed_dawg->readFile(dawgfilename); } - } return *fixed_dawg; } /*! Returns the changeable QDawg that contains general words for the current locale. |