From: san Date: Tue, 20 Dec 2005 16:03:39 +0000 (+0000) Subject: Temorary files removed at the end of closing a study. X-Git-Tag: CTH_V1_0_3~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d1569a17028e0bb2b37d018fe19fb0e6acc81f8;p=modules%2Fgui.git Temorary files removed at the end of closing a study. Workaround for OSD_Protection bug on WIndows --- diff --git a/src/LightApp/LightApp_Driver.cxx b/src/LightApp/LightApp_Driver.cxx index 5b56e03b7..2212357e7 100644 --- a/src/LightApp/LightApp_Driver.cxx +++ b/src/LightApp/LightApp_Driver.cxx @@ -523,7 +523,12 @@ std::string LightApp_Driver::GetTmpDir() aDir = OSD_Directory(aPath); } - OSD_Protection aProtection(OSD_RW, OSD_RWX, OSD_RX, OSD_RX); +#ifdef WIN32 + // Workaround for OSD_Protection bug on Windows + OSD_Protection aProtection(OSD_RWXD, OSD_RWXD, OSD_RWXD, OSD_RWXD); +#else + OSD_Protection aProtection(OSD_RX, OSD_RWXD, OSD_RX, OSD_RX); +#endif aDir.Build(aProtection); myTmpDir = aTmpDir.ToCString(); diff --git a/src/LightApp/LightApp_Study.cxx b/src/LightApp/LightApp_Study.cxx index 551737a64..adf895f26 100644 --- a/src/LightApp/LightApp_Study.cxx +++ b/src/LightApp/LightApp_Study.cxx @@ -229,16 +229,14 @@ bool LightApp_Study::saveDocument() //================================================================ void LightApp_Study::closeDocument(bool permanently) { - // Remove temporary files - ModelList aList; - dataModels( aList ); - myDriver->ClearDriverContents(); - // Inform everybody that this study is going to close when it's most safe to, // i.e. in the very beginning emit closed( this ); CAM_Study::closeDocument(permanently); + + // Remove temporary files + myDriver->ClearDriverContents(); } //================================================================