QTfrontend/hwform.cpp
changeset 8639 33d29ed99faa
parent 8613 82c649dfc7c3
child 8643 e4d1c21f8db0
--- a/QTfrontend/hwform.cpp	Mon Mar 04 10:33:30 2013 +0100
+++ b/QTfrontend/hwform.cpp	Mon Mar 04 11:09:36 2013 +0100
@@ -1919,7 +1919,7 @@
     if (success) success = system("xdg-mime default hwengine.desktop application/x-hedgewars-demo")==0;
     if (success) success = system("xdg-mime default hwengine.desktop application/x-hedgewars-save")==0;
     // hack to add user's settings to hwengine. might be better at this point to read in the file, append it, and write it out to its new home.  This assumes no spaces in the data dir path
-    if (success) success = system(("sed -i 's/^\\(Exec=.*\\) \\([^ ]* %f\\)/\\1 \\2 "+arguments+"/' "+QDir::home().absolutePath()+"/.local/share/applications/hwengine.desktop").toLocal8Bit().constData())==0;
+    if (success) success = system(("sed -i 's|^\\(Exec=.*\\) \\(%f\\)|\\1 \\2 "+arguments+"|' "+QDir::home().absolutePath()+"/.local/share/applications/hwengine.desktop").toLocal8Bit().constData())==0;
 #endif
     if (success)
     {