From: rnv Date: Mon, 13 May 2019 13:36:02 +0000 (+0300) Subject: Fix for "[CEA]: Windows version: Dump Python: there is an error in the file name... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fe5ea3510b95a62e53548b5f4130d1dc25b9c433;p=modules%2Fyacs.git Fix for "[CEA]: Windows version: Dump Python: there is an error in the file name generated for geompy.ImportXAO" issue. --- diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx index daa4b8f55..8a1974a96 100644 --- a/src/Basics/Basics_DirUtils.cxx +++ b/src/Basics/Basics_DirUtils.cxx @@ -27,6 +27,8 @@ #include #include +#include + #ifndef WIN32 # include # include @@ -339,4 +341,14 @@ namespace Kernel_Utils #endif return result; } + + //============================================================================ + // function : BackSlashToSlash + // purpose : Convert back slash to slash + //============================================================================ + std::string BackSlashToSlash(const std::string& path) { + std::string res = path; + std::replace(res.begin(), res.end(), '\\', '/'); + return res; + } } diff --git a/src/Basics/Basics_DirUtils.hxx b/src/Basics/Basics_DirUtils.hxx index fc3e482d0..34dbc7a69 100644 --- a/src/Basics/Basics_DirUtils.hxx +++ b/src/Basics/Basics_DirUtils.hxx @@ -68,6 +68,8 @@ namespace Kernel_Utils // Returns True(False) if the path (not) empty // Also returns False if the path is not valid BASICS_EXPORT bool IsEmptyDir( const std::string& path ); + + BASICS_EXPORT std::string BackSlashToSlash( const std::string& path ); } #endif