check for subs first
authornemo
Mon, 01 Nov 2010 18:07:36 -0400
changeset 4085 6bbc5a167a21
parent 4084 0d0bf0533eee
child 4086 54185e353242
child 4087 c149f6c4aa9c
check for subs first
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Mon Nov 01 17:58:59 2010 -0400
+++ b/QTfrontend/hwform.cpp	Mon Nov 01 18:07:36 2010 -0400
@@ -1132,7 +1132,12 @@
     registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\"");
     registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\"");
 #else
+    if (success) success = checkForDir(QDir::home().absolutePath() + "/.local");
+    if (success) success = checkForDir(QDir::home().absolutePath() + "/.local/share");
+    if (success) success = checkForDir(QDir::home().absolutePath() + "/.local/share/mime");
     if (success) success = checkForDir(QDir::home().absolutePath() + "/.local/share/mime/packages");
+    if (success) success = checkForDir(QDir::home().absolutePath() + "/.local");
+    if (success) success = checkForDir(QDir::home().absolutePath() + "/.local/share");
     if (success) success = checkForDir(QDir::home().absolutePath() + "/.local/share/applications");
     if (success) success = system(("cp "+datadir->absolutePath()+"/misc/hedgewars-mimeinfo.xml "+QDir::home().absolutePath()+"/.local/share/mime/packages").toLocal8Bit().constData())==0;
     if (success) success = system(("cp "+datadir->absolutePath()+"/misc/hwengine.desktop "+QDir::home().absolutePath()+"/.local/share/applications").toLocal8Bit().constData())==0;