Fix a bug about setting LD_LIBRARY_PATH 31/294031/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 12 Jun 2023 02:27:42 +0000 (02:27 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 12 Jun 2023 02:27:42 +0000 (02:27 +0000)
The path of the LD_LIBRARY_PATH should be
'<app_root_path>/bin/<executable_file>/../lib/".

Change-Id: I6062208fe217d17298132a8edeb2244e047b17e1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/launchpad-glib/util.cc

index c97db86..0432e8a 100644 (file)
@@ -454,7 +454,7 @@ int Util::WaitTepMount(const AppInfo* app_info) {
 
 std::string Util::GetLibDirectory(const AppInfo* app_info) {
   std::filesystem::path path(app_info->GetAppPath());
-  auto lib_dir = path.relative_path().string() + "/../lib/";
+  auto lib_dir = path.parent_path().string() + "/../lib/";
   if (std::filesystem::exists(lib_dir))
     return lib_dir;