]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
SWP12966 - MutiFile is not saved correctly
authorskt <skt@opencascade.com>
Fri, 18 Aug 2006 08:32:34 +0000 (08:32 +0000)
committerskt <skt@opencascade.com>
Fri, 18 Aug 2006 08:32:34 +0000 (08:32 +0000)
Fix in GetDirFromPath() - correct directory path generation

src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx

index 46529552b6b34ef94a93d4bd6e9f02504d0b93c3..4755e3c0733112d1fdf78d81e7ec4323321e7bb2 100644 (file)
@@ -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 <disk> assignment in <path> 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;
 }