fullpath fixed on Windows 61/18761/3
Cedric Delamarre [Tue, 6 Dec 2016 14:22:20 +0000 (15:22 +0100)]
  test_run functions get_function_path
  test_run functions bug_13903
  test_run functions bug_4608
  test_run functions bug_7952

Change-Id: Ia353be524dcc9a91760ac7c6bf572cb72ce9ee14

scilab/modules/fileio/src/c/fullpath.c

index d2d362d..9bf1280 100644 (file)
@@ -27,6 +27,7 @@
 #include "PATH_MAX.h"
 #include "strsubst.h"
 #include "scicurdir.h"
+#include "expandPathVariable.h"
 /*--------------------------------------------------------------------------*/
 #ifndef _MSC_VER
 static unsigned int isDirSeparator(const char c);
@@ -158,7 +159,9 @@ wchar_t *get_full_pathW(wchar_t * _wcFullPath, const wchar_t * _wcPath, size_t _
 #if defined(_MSC_VER)
     if (_wcPath)
     {
-        _wfullpath(_wcFullPath, _wcPath, _SizeInBytes);
+        wchar_t* pwstExpand = expandPathVariableW(_wcPath);
+        _wfullpath(_wcFullPath, pwstExpand, _SizeInBytes);
+        FREE(pwstExpand);
         return _wcFullPath;
     }
     return NULL;