diff --git a/src/core/engine.cpp b/src/core/engine.cpp --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -118,13 +118,19 @@ emit signalBusy(i18n("Initializing")); - KConfig conf(configfile); - if (conf.accessMode() == KConfig::NoAccess) { + if(!QFileInfo::exists(configfile)) { emit signalError(i18n("Configuration file not found: \"%1\"", configfile)); qCritical() << "No knsrc file named '" << configfile << "' was found." << endl; return false; } + KConfig conf(configfile); + if (conf.accessMode() == KConfig::NoAccess) { + emit signalError(i18n("Configuration file exists, but cannot be opened: \"%1\"", configfile)); + qCritical() << "The knsrc file '" << configfile << "' was found but could not be opened." << endl; + return false; + } + KConfigGroup group; if (conf.hasGroup("KNewStuff3")) { qCDebug(KNEWSTUFFCORE) << "Loading KNewStuff3 config: " << configfile;