Salome HOME
Fix for "[CEA]: Windows version: Dump Python: there is an error in the file name...
[modules/geom.git] / src / VTKPlugin / VTKPlugin_IOperations.cxx
index 8ffda5c6eea334551743b59bf8cefe44b3345f58..b5ca0e326e746eb85accfc802e0564854fd3ef7d 100644 (file)
@@ -23,6 +23,7 @@
 #include "VTKPlugin_IExport.hxx"
 
 // KERNEL includes
+#include <Basics_DirUtils.hxx>
 #include <utilities.h>
 
 // GEOM includes
@@ -101,8 +102,9 @@ void VTKPlugin_IOperations::ExportVTK( const Handle(GEOM_Object)      theOrigina
   }
 
   //Make a Python command
+  std::string convFileName = Kernel_Utils::BackSlashToSlash(theFileName.ToCString());
   GEOM::TPythonDump(aFunction) << "geompy.ExportVTK(" << theOriginal << ", \""
-    << theFileName.ToCString() << "\", " << theDeflection << ")";
+    << convFileName.c_str() << "\", " << theDeflection << ")";
 
   SetErrorCode(OK);
 }