mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 08:11:53 +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());
|
||||
exec = opkMount + exec;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
//Set correct working directory
|
||||
string::size_type pos = exec.rfind("/");
|
||||
if (pos != string::npos) {
|
||||
string wd = exec.substr(0, pos + 1);
|
||||
chdir(wd.c_str());
|
||||
exec = exec.substr(pos + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
//selectedFile
|
||||
if (selectedFile!="") {
|
||||
|
Loading…
Reference in New Issue
Block a user