]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
54524: [FORUM]: Export in STL work wrong' issue
authoreap <eap@opencascade.com>
Mon, 1 Apr 2019 15:39:56 +0000 (18:39 +0300)
committereap <eap@opencascade.com>
Mon, 1 Apr 2019 15:39:56 +0000 (18:39 +0300)
src/SMESHUtils/SMESH_File.cxx
src/SMESH_I/SMESH_Mesh_i.cxx

index 888de195691438d7f5023a69b1787abe82193731..a8983d247e1c25c84edbb09bd186ebe904d3e87d 100644 (file)
@@ -319,6 +319,8 @@ bool SMESH_File::getInts(std::vector<int>& ints)
 
 bool SMESH_File::openForWriting()
 {
+  close();
+
 #ifdef WIN32
 #ifdef UNICODE
   std::wstring  aName = Kernel_Utils::utf8_decode_s(_name);
index 8b7485ff94d19560db523df5d866acc24041f215..67daefbd06612cd62e45f4de421d39b4f8d7218e 100644 (file)
@@ -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() ) {