Salome HOME
Fix for the robinet model with partitions: final groups selection with neighbors...
[modules/shaper.git] / src / Model / Model_Document.cpp
index a8a82e1af680f5f0dfbfc2c1897a32eed5e30013..bed5d345584cf0ec14bc9f99a607f457fbeab296 100755 (executable)
@@ -365,7 +365,10 @@ bool Model_Document::save(
   Handle(Model_Application) anApp = Model_Application::getApplication();
   if (isRoot()) {
 #ifdef WIN32
-    CreateDirectory((LPTSTR) theDirName, NULL);
+    size_t aDirLen = strlen(theDirName);
+    std::wstring aWStr(aDirLen, L'#');
+    mbstowcs(&aWStr[0], theDirName, aDirLen);
+    CreateDirectory(aWStr.c_str(), NULL);
 #else
     mkdir(theDirName, 0x1ff);
 #endif