From: abd Date: Wed, 3 May 2006 11:28:53 +0000 (+0000) Subject: Fix bug SWP12334 X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~51 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=47072761d55bca9f109ff143a8d3b4320cf4590e;p=modules%2Fkernel.git Fix bug SWP12334 --- 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;