]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug SWP12334
authorabd <abd@opencascade.com>
Wed, 3 May 2006 11:28:53 +0000 (11:28 +0000)
committerabd <abd@opencascade.com>
Wed, 3 May 2006 11:28:53 +0000 (11:28 +0000)
src/TOOLSDS/SALOMEDS_Tool.cxx

index 89065afab6be92ed21452cc07ff3382a6ec1102f..ba910a651ede10a13cc899a7277c174ed3d53b2c 100644 (file)
@@ -105,7 +105,8 @@ std::string SALOMEDS_Tool::GetTmpDir()
 
   MESSAGE("#### TMP" << aTmpDir.ToCString());
 
-  OSD_Protection aProtection(OSD_RW, OSD_RWX, OSD_RX, OSD_RX);
+  //OSD_Protection aProtection(OSD_RW, OSD_RWX, OSD_RX, OSD_RX);
+  OSD_Protection aProtection(OSD_RWXD, OSD_RWX, OSD_RX, OSD_RX );
   aDir.Build(aProtection);
 
   return aTmpDir.ToCString();
@@ -131,7 +132,8 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
     if(!anOSDFile.Exists()) continue;
 
     OSD_Protection aProtection = anOSDFile.Protection();
-    aProtection.SetUser(OSD_RW);
+    aProtection.SetUser(OSD_RWD);
+    //aProtection.SetSystem(OSD_RW);
     anOSDFile.SetProtection(aProtection);
 
     anOSDFile.Remove();
@@ -306,7 +308,11 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream,
       aCurrentPos += 8;    
       
       TCollection_AsciiString aFullPath = aTmpDir + aFileName;
+#ifdef WNT
+      ofstream aFile(aFullPath.ToCString(), ios::binary);
+#else
       ofstream aFile(aFullPath.ToCString());
+#endif
       aFile.write((char *)(aBuffer+aCurrentPos), aFileSize); 
       aFile.close();  
       aCurrentPos += aFileSize;