]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Bug SWP12123 fixed. Removing temporary directories
authorskt <skt@opencascade.com>
Wed, 2 Aug 2006 13:00:03 +0000 (13:00 +0000)
committerskt <skt@opencascade.com>
Wed, 2 Aug 2006 13:00:03 +0000 (13:00 +0000)
src/TOOLSDS/SALOMEDS_Tool.cxx

index a062e0f46dbc5f2eac3e823f40966de642a2247a..b47af559f706f54f6f9b0f7f671a52f6c19f80d2 100644 (file)
@@ -143,7 +143,11 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
     OSD_Directory aDir(aPath);
     OSD_FileIterator anIterator(aPath, '*');
 
-    if(aDir.Exists() && !anIterator.More()) aDir.Remove();
+    if(aDir.Exists() && !anIterator.More())
+               {
+                       anIterator.Destroy();
+                       aDir.Remove();
+               }
   }
 
 }