1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 07:58:28 +02:00

Update "exec" to aim the binary if a change of directory if needed

This commit is contained in:
Paul Cercueil 2012-10-17 23:48:11 +02:00
parent 0ddc562bf1
commit 6a9f429f32

View File

@ -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!="") {