From 47072761d55bca9f109ff143a8d3b4320cf4590e Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 3 May 2006 11:28:53 +0000 Subject: [PATCH] Fix bug SWP12334 --- src/TOOLSDS/SALOMEDS_Tool.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index 89065afab..ba910a651 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -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; -- 2.39.2