From: skt Date: Fri, 18 Aug 2006 08:32:34 +0000 (+0000) Subject: SWP12966 - MutiFile is not saved correctly X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=204c47b848db693715bc73e56eb4bd94c7bb8e9c;p=modules%2Fkernel.git SWP12966 - MutiFile is not saved correctly Fix in GetDirFromPath() - correct directory path generation --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx index 46529552b..4755e3c07 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx @@ -156,7 +156,12 @@ TCollection_AsciiString SALOMEDSImpl_Tool::GetNameFromPath(const TCollection_Asc TCollection_AsciiString SALOMEDSImpl_Tool::GetDirFromPath(const TCollection_AsciiString& thePath) { if (thePath.IsEmpty()) return ""; OSD_Path aPath = OSD_Path(thePath); - TCollection_AsciiString aDirString(aPath.Trek()); + TCollection_AsciiString aDirString; + /*Unix platform don't use assignment in string + but we must to add it for WNT case*/ + TCollection_AsciiString disk = aPath.Disk(); + if(disk.Length()) aDirString.AssignCat(disk); + aDirString.AssignCat(aPath.Trek()); aDirString.ChangeAll('|','/'); return aDirString; }