[bug_6550] getPath of Library type fixed 57/18757/3
Cedric Delamarre [Tue, 6 Dec 2016 08:41:13 +0000 (09:41 +0100)]
  * test_run functions bug_6550
  * --> string(lib)

Change-Id: I477feec1a6a14acc41367f1b1889b23bed931fee

scilab/modules/ast/fileio_Import.def
scilab/modules/ast/src/cpp/types/library.cpp

index 2be9e6c..f3b92f4 100644 (file)
@@ -6,3 +6,4 @@ removedir
 getshortpathname
 FileExistW
 getfile_filename
+get_full_pathW
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;
 }
 }