bug 14909: getshortpathname and getlongpathname return values with '\' instead of '/'
[scilab.git] / scilab / modules / fileio / sci_gateway / cpp / sci_getlongpathname.cpp
index 3e70bfc..d87e3ed 100644 (file)
@@ -20,6 +20,7 @@
 
 extern "C"
 {
+#include "pathconvert.h"
 #include "getlongpathname.h"
 #include "Scierror.h"
 #include "localization.h"
@@ -55,7 +56,9 @@ types::Function::ReturnValue sci_getlongpathname(types::typed_list &in, int _iRe
     for (int i = 0 ; i < size; i++)
     {
         wchar_t* tmp = getlongpathnameW(p[i], (BOOL*)&pBool[i]);
-        pOut1->set(i, tmp);
+        wchar_t* pwstPath = pathconvertW(tmp, FALSE, FALSE, AUTO_STYLE);
+        pOut1->set(i, pwstPath);
+        FREE(pwstPath);
         FREE(tmp);
     }