[bug_6550] getPath of Library type fixed
[scilab.git] / scilab / modules / ast / src / cpp / types / library.cpp
index 1e207bd..ee6c122 100644 (file)
 
 extern "C"
 {
+#include <PATH_MAX.h>
 #include <wchar.h>
 #include "os_string.h"
+#include "fullpath.h"
 }
 
 namespace types
@@ -129,6 +131,10 @@ int Library::getMacrosName(std::list<std::wstring>& lst)
 
 std::wstring Library::getPath()
 {
-    return m_wstPath;
+    wchar_t* pwstFullPath = (wchar_t*)MALLOC(sizeof(wchar_t) * (PATH_MAX * 2));
+    get_full_pathW(pwstFullPath, m_wstPath.c_str(), PATH_MAX * 2);
+    std::wstring wstrOut(pwstFullPath);
+    FREE(pwstFullPath);
+    return wstrOut;
 }
 }