]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Temorary files removed at the end of closing a study.
authorsan <san@opencascade.com>
Tue, 20 Dec 2005 16:03:39 +0000 (16:03 +0000)
committersan <san@opencascade.com>
Tue, 20 Dec 2005 16:03:39 +0000 (16:03 +0000)
Workaround for OSD_Protection bug on WIndows

src/LightApp/LightApp_Driver.cxx
src/LightApp/LightApp_Study.cxx

index 5b56e03b7eb33f10cf4c206ef4e62d79622e9521..2212357e795150f2056fa63cd4e34bc82adb0984 100644 (file)
@@ -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();
index 551737a648da2b250f755ac992b05fc2b93053d1..adf895f26f280afd5d502a08cd9d43f7f10f711b 100644 (file)
@@ -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();
 }
 
 //================================================================