Salome HOME
Copyright update 2020
[modules/geom.git] / src / VTKPlugin / VTKPlugin_IOperations.cxx
index 532a3dddfd178eefdccc944568b9545dc9952290..6e8ea8dc090c66ccaae7b8fa98c619cee8b65de1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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);
 }