mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 12:36:17 +02:00
Execute the links directly, don't use the shell
This breaks one thing: the "params" option of the links must be only one parameter (without spaces). The only way to actually set this option being to edit the config files manually, it is pretty safe to assume it will never contain two parameters.
This commit is contained in:
parent
6ef3f3b190
commit
2ab44489a1
@ -586,11 +586,6 @@ void LinkApp::launch(const string &selectedFile) {
|
|||||||
|
|
||||||
INFO("Executing '%s' (%s %s)\n", title.c_str(), exec.c_str(), params.c_str());
|
INFO("Executing '%s' (%s %s)\n", title.c_str(), exec.c_str(), params.c_str());
|
||||||
|
|
||||||
//check if we have to quit
|
|
||||||
string command = exec;
|
|
||||||
|
|
||||||
if (!params.empty()) command += " " + params;
|
|
||||||
|
|
||||||
if (gmenu2x->confInt["outputLogs"]
|
if (gmenu2x->confInt["outputLogs"]
|
||||||
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
&& !consoleApp
|
&& !consoleApp
|
||||||
@ -642,7 +637,18 @@ void LinkApp::launch(const string &selectedFile) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
execlp("/bin/sh","/bin/sh", "-c", command.c_str(), NULL);
|
if (isOpk()) {
|
||||||
|
#ifdef HAVE_LIBOPK
|
||||||
|
execlp("opkrun", "opkrun", "-m", metadata.c_str(), opkFile.c_str(),
|
||||||
|
!params.empty() ? params.c_str() : NULL,
|
||||||
|
NULL);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
execlp(exec.c_str(), exec.c_str(),
|
||||||
|
!params.empty() ? params.c_str() : NULL,
|
||||||
|
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
|
||||||
gmenu2x->main();
|
gmenu2x->main();
|
||||||
|
Loading…
Reference in New Issue
Block a user