]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
BugID 11225, added a removal of the files which have to be created
authorsrn <srn@opencascade.com>
Fri, 13 Jan 2006 14:28:21 +0000 (14:28 +0000)
committersrn <srn@opencascade.com>
Fri, 13 Jan 2006 14:28:21 +0000 (14:28 +0000)
src/SMESH_I/SMESH_Gen_i.cxx

index 39c1b762968c21302889cff1d72a09c660ec8f76..79f87e11617f8195f42c6ef7d54559e7c9c859b9 100644 (file)
@@ -1128,6 +1128,15 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
   HDFgroup*   aSubSubGroup;
   hdf_size    aSize[ 1 ];
 
+
+  //Remove the files if they exist: BugID: 11225
+  TCollection_AsciiString cmd("rm -f \"");
+  cmd+=filename;
+  cmd+="\" \"";
+  cmd+=meshfile;
+  cmd+="\"";
+  system(cmd.ToCString());
+
   // MED writer to be used by storage process
   DriverMED_W_SMESHDS_Mesh myWriter;
   myWriter.SetFile( meshfile.ToCString() );
@@ -1136,7 +1145,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
   // ---> create HDF file
   aFile = new HDFfile( filename.ToCString() );
   aFile->CreateOnDisk();
-  
+
   // --> iterator for top-level objects
   SALOMEDS::ChildIterator_var itBig = myCurrentStudy->NewChildIterator( theComponent );
   for ( ; itBig->More(); itBig->Next() ) {