From 0d1569a17028e0bb2b37d018fe19fb0e6acc81f8 Mon Sep 17 00:00:00 2001 From: san Date: Tue, 20 Dec 2005 16:03:39 +0000 Subject: [PATCH] Temorary files removed at the end of closing a study. Workaround for OSD_Protection bug on WIndows --- src/LightApp/LightApp_Driver.cxx | 7 ++++++- src/LightApp/LightApp_Study.cxx | 8 +++----- 2 files changed, 9 insertions(+), 6 deletions(-) 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(); } //================================================================ -- 2.39.2