From a21650d6b3ea0e8775e3f51551b1a35f06544189 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sun, 24 Jun 2012 23:01:28 +0200 Subject: [PATCH] Don't re-execute gmenu2x on error, just call main() again. --- src/gmenu2x.cpp | 3 +-- src/linkapp.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index 4de7aa5..8d95029 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -849,8 +849,7 @@ void GMenu2X::explorer() { //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue //try relaunching gmenu2x ERROR("Error executing selected application, re-launching gmenu2x\n"); - chdir(getExePath().c_str()); - execlp("./gmenu2x", "./gmenu2x", NULL); + main(); } } diff --git a/src/linkapp.cpp b/src/linkapp.cpp index 95c877a..541ba6e 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -462,8 +462,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) { execlp("/bin/sh","/bin/sh", "-c", command.c_str(), NULL); //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue //try relaunching gmenu2x - chdir(gmenu2x->getExePath().c_str()); - execlp("./gmenu2x", "./gmenu2x", NULL); + gmenu2x->main(); } chdir(gmenu2x->getExePath().c_str());