Bug-fix : plugin extra directory should be added for TPA searching directory. accepted/tizen/unified/20190412.124729 submit/tizen/20190412.014021
authorWoongsuk Cho <ws77.cho@samsung.com>
Fri, 12 Apr 2019 01:25:33 +0000 (10:25 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Fri, 12 Apr 2019 01:33:11 +0000 (10:33 +0900)
NativeLauncher/util/path_manager.cc

index 8644bf0..daa8f34 100644 (file)
@@ -137,6 +137,22 @@ static std::string getPlatformTPA()
        return platform_tpa;
 }
 
+static std::string getPluginTPA()
+{
+       std::string plugin_tpa;
+
+       char* plugin_tpa_list = pluginGetTPA();
+       if (plugin_tpa_list) {
+               _INFO("plugin TPA list found. use TPA list for plugin");
+               plugin_tpa = plugin_tpa_list;
+       } else if (!__dllPath->extra_dirs.empty()){
+               _INFO("plugin extra directory found. use plugin extra directroy for TPA");
+               assembliesInDirectory(__dllPath->extra_dirs, plugin_tpa);
+       }
+
+       return plugin_tpa;
+}
+
 std::string getTPA()
 {
        if (!__tpa.empty()) {
@@ -147,14 +163,6 @@ std::string getTPA()
                return std::string("");
        }
 
-       __tpa = getPlatformTPA();
-
-       char* pluginTPA = pluginGetTPA();
-       if (pluginTPA) {
-               _INFO("plugin tpa found.\n");
-               __tpa = __tpa + ":" + pluginTPA;
-       }
-
-       return __tpa;
+       return getPlatformTPA() + ":" + getPluginTPA();
 }