From a9af195d4038d9caef14302c725d734b938ac50f Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 1 Apr 2019 12:31:32 +0300 Subject: [PATCH 1/2] Fix for '54524: [FORUM]: Export in STL work wrong' issue. --- src/SMESH_I/SMESH_Mesh_i.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 0b4d0937b..8b7485ff9 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3283,7 +3283,7 @@ CORBA::Boolean SMESH_Mesh_i::HasDuplicatedGroupNamesMED() void SMESH_Mesh_i::PrepareForWriting (const char* file, bool overwrite) { - SMESH_File aFile( file ); + SMESH_File aFile( file , false ); SMESH_Comment msg; if (aFile.exists()) { // existing filesystem node From ee0db2f2379993be34b880ddc5c0040dab2e208d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 1 Apr 2019 18:39:56 +0300 Subject: [PATCH 2/2] 54524: [FORUM]: Export in STL work wrong' issue --- src/SMESHUtils/SMESH_File.cxx | 2 ++ src/SMESH_I/SMESH_Mesh_i.cxx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index 888de1956..a8983d247 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -319,6 +319,8 @@ bool SMESH_File::getInts(std::vector& ints) bool SMESH_File::openForWriting() { + close(); + #ifdef WIN32 #ifdef UNICODE std::wstring aName = Kernel_Utils::utf8_decode_s(_name); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 8b7485ff9..67daefbd0 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3283,9 +3283,9 @@ CORBA::Boolean SMESH_Mesh_i::HasDuplicatedGroupNamesMED() void SMESH_Mesh_i::PrepareForWriting (const char* file, bool overwrite) { - SMESH_File aFile( file , false ); + SMESH_File aFile( file, false ); SMESH_Comment msg; - if (aFile.exists()) { + if ( aFile.exists() ) { // existing filesystem node if ( !aFile.isDirectory() ) { if ( aFile.openForWriting() ) {