-// 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
bool SMESH_File::openForWriting()
{
+ close();
+
#ifdef WIN32
#ifdef UNICODE
std::wstring aName = Kernel_Utils::utf8_decode_s(_name);