From 6a9f429f32471632504d52f042bd506bbd72d360 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 17 Oct 2012 23:48:11 +0200 Subject: [PATCH] Update "exec" to aim the binary if a change of directory if needed --- src/linkapp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/linkapp.cpp b/src/linkapp.cpp index f392162..69fe17c 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -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!="") {