bug-fix : support plugin path for tpa
[platform/core/dotnet/launcher.git] / NativeLauncher / util / path_manager.cc
index cc42e88..99446ed 100644 (file)
@@ -75,11 +75,9 @@ int initializePathManager(const std::string& runtimeDir, const std::string& tize
        if (!extraDir.empty()) {
                splitPath(extraDir, __dllPath->extra_dirs);
        } else {
-               if (pluginGetDllPath()) {
-                       std::string pluginPath(pluginGetDllPath());
-                       if (!pluginPath.empty()) {
-                               splitPath(pluginPath, __dllPath->extra_dirs);
-                       }
+               char* extraPath = pluginGetDllPath();
+               if (extraPath) {
+                       splitPath(extraPath, __dllPath->extra_dirs);
                }
        }
 
@@ -129,7 +127,7 @@ std::string getTPA()
        tpaDir.push_back(getRuntimeDir());
        tpaDir.push_back(getTizenFXDir());
        tpaDir.push_back(getTizenFXRefDir());
-       tpaDir.insert(tpaDir.end(), getExtraDirs().begin(), getExtraDirs().end());
+       tpaDir.insert(tpaDir.end(), __dllPath->extra_dirs.begin(), __dllPath->extra_dirs.end());
        assembliesInDirectory(tpaDir, __tpa);
 
        return __tpa;