From: eap Date: Mon, 1 Apr 2019 15:39:56 +0000 (+0300) Subject: 54524: [FORUM]: Export in STL work wrong' issue X-Git-Tag: V9_3_0rc1~4^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee0db2f2379993be34b880ddc5c0040dab2e208d;p=modules%2Fsmesh.git 54524: [FORUM]: Export in STL work wrong' issue --- 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() ) {