Bug-fix : plugin extra directory should be added for TPA searching directory.
[platform/core/dotnet/launcher.git] / 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();
 }