hopefully fix bug 523, file extension association
authorkoda
Mon, 04 Mar 2013 11:09:36 +0100
changeset 8639 33d29ed99faa
parent 8638 0a6837edb278
child 8640 75d42abc9375
hopefully fix bug #523, file extension association
QTfrontend/hwform.cpp
--- 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)
     {