From ee0db2f2379993be34b880ddc5c0040dab2e208d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 1 Apr 2019 18:39:56 +0300 Subject: [PATCH] 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() ) { -- 2.30.2