Salome HOME
Copyright update 2020
[modules/smesh.git] / src / SMESHUtils / SMESH_File.cxx
index 888de195691438d7f5023a69b1787abe82193731..77df586f5312799921dee836a88ba8da136f2402 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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);