diff -r 50369fa5053b -r ab0b618bdf13 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Mon Dec 24 03:00:18 2012 +0100 +++ b/QTfrontend/main.cpp Mon Dec 24 15:41:45 2012 +0100 @@ -175,9 +175,14 @@ if(parsedArgs.contains("config-dir")) { QFileInfo f(parsedArgs["config-dir"]); - *cConfigDir = f.absoluteFilePath(); + cfgdir->setPath(f.absoluteFilePath()); custom_config = true; } + else + { + cfgdir->setPath(QDir::homePath()); + custom_config = false; + } app.setStyle(new QPlastiqueStyle()); @@ -190,14 +195,10 @@ qRegisterMetaType("HWTeam"); // workaround over NSIS installer which modifies the install path - bindir->cd("./"); + //bindir->cd("./"); + bindir->cd(QCoreApplication::applicationDirPath()); - if(cConfigDir->length() == 0) - cfgdir->setPath(cfgdir->homePath()); - else - cfgdir->setPath(*cConfigDir); - - if(cConfigDir->length() == 0) + if(custom_config == false) { #ifdef __APPLE__ checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars");