1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-23 03:24:38 +02:00

Don't re-execute gmenu2x on error, just call main() again.

This commit is contained in:
Paul Cercueil 2012-06-24 23:01:28 +02:00
parent 0d9977e54c
commit a21650d6b3
2 changed files with 2 additions and 4 deletions

View File

@ -849,8 +849,7 @@ void GMenu2X::explorer() {
//if execution continues then something went wrong and as we already called SDL_Quit we cannot continue //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue
//try relaunching gmenu2x //try relaunching gmenu2x
ERROR("Error executing selected application, re-launching gmenu2x\n"); ERROR("Error executing selected application, re-launching gmenu2x\n");
chdir(getExePath().c_str()); main();
execlp("./gmenu2x", "./gmenu2x", NULL);
} }
} }

View File

@ -462,8 +462,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
execlp("/bin/sh","/bin/sh", "-c", command.c_str(), NULL); 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 //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue
//try relaunching gmenu2x //try relaunching gmenu2x
chdir(gmenu2x->getExePath().c_str()); gmenu2x->main();
execlp("./gmenu2x", "./gmenu2x", NULL);
} }
chdir(gmenu2x->getExePath().c_str()); chdir(gmenu2x->getExePath().c_str());