diff --git a/src/sword_backend/module_store.cpp b/src/sword_backend/module_store.cpp index 7bf4301..9a557ed 100644 --- a/src/sword_backend/module_store.cpp +++ b/src/sword_backend/module_store.cpp @@ -66,10 +66,12 @@ SWMgr* ModuleStore::createSWMgr() isAndroid = true; #endif + MarkupFilterMgr* markupFilterMgr = new MarkupFilterMgr(sword::FMT_OSIS, sword::ENC_UTF8); + if (customHomeDir != "" || isAndroid) { swMgr = new SWMgr(this->_fileSystemHelper.getUserSwordDir().c_str(), true, // autoload - new MarkupFilterMgr(sword::FMT_OSIS, sword::ENC_UTF8), + markupFilterMgr, false, // multiMod false); // augmentHome @@ -82,7 +84,7 @@ SWMgr* ModuleStore::createSWMgr() #ifdef _WIN32 swMgr = new SWMgr(this->_fileSystemHelper.getUserSwordDir().c_str(), true, // autoload - new MarkupFilterMgr(sword::FMT_OSIS, sword::ENC_UTF8), + markupFilterMgr, false, // multimod true); // augmentHome @@ -90,13 +92,13 @@ SWMgr* ModuleStore::createSWMgr() // We're keeping it here for now in case this becomes relevant again. // this->_mgr->augmentModules(this->_fileSystemHelper.getSystemSwordDir().c_str()); #elif defined(__APPLE__) - swMgr = new SWMgr(new MarkupFilterMgr(sword::FMT_OSIS, sword::ENC_UTF8)); + swMgr = new SWMgr(markupFilterMgr); stringstream appSupport; appSupport << string(getenv("HOME")) << "/Library/Application Support/Sword"; swMgr->augmentModules(appSupport.str().c_str()); #else // LINUX! - swMgr = new SWMgr(new MarkupFilterMgr(sword::FMT_OSIS, sword::ENC_UTF8)); + swMgr = new SWMgr(markupFilterMgr); #endif }