mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 16:44:03 +02:00
Update "exec" to aim the binary if a change of directory if needed
This commit is contained in:
parent
0ddc562bf1
commit
6a9f429f32
@ -471,14 +471,16 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
|||||||
chdir(opkMount.c_str());
|
chdir(opkMount.c_str());
|
||||||
exec = opkMount + exec;
|
exec = opkMount + exec;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#else
|
||||||
//Set correct working directory
|
//Set correct working directory
|
||||||
string::size_type pos = exec.rfind("/");
|
string::size_type pos = exec.rfind("/");
|
||||||
if (pos != string::npos) {
|
if (pos != string::npos) {
|
||||||
string wd = exec.substr(0, pos + 1);
|
string wd = exec.substr(0, pos + 1);
|
||||||
chdir(wd.c_str());
|
chdir(wd.c_str());
|
||||||
|
exec = exec.substr(pos + 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//selectedFile
|
//selectedFile
|
||||||
if (selectedFile!="") {
|
if (selectedFile!="") {
|
||||||
|
Loading…
Reference in New Issue
Block a user