]> OCCT Git - occt-copy.git/commitdiff
0024296: Test "bugs fclasses bug309" is crashed if current directory is into disc...
authorski <ski@opencascade.com>
Fri, 23 Sep 2016 14:06:12 +0000 (17:06 +0300)
committerski <ski@opencascade.com>
Fri, 7 Oct 2016 14:03:00 +0000 (17:03 +0300)
Fixed incorrect inclusion of slash symbol to the path.

src/OSD/OSD_Path.cxx
tests/bugs/fclasses/bug309

index 5ceb3669b161e53879de6e650cc49140a4bd26fb..5794e3d371963597906d39ccdbbaea103acb6f13 100644 (file)
@@ -1022,7 +1022,7 @@ void OSD_Path :: SystemName (
 
  Standard_Integer        i, j;
  TCollection_AsciiString fullPath;
static Standard_Character trek [ _MAX_PATH ];
+ Standard_Character trek [ _MAX_PATH ];
  Standard_Character      chr;
 
  memset(trek,0,_MAX_PATH);
@@ -1048,8 +1048,8 @@ void OSD_Path :: SystemName (
  }  //end for
 
  fullPath = myDisk + TCollection_AsciiString(trek);
- if ( trek[0] ) fullPath += "/";
+
+ if ( j >= 2 && trek[j-2] != '/' ) fullPath += "/";
  
  fullPath += ( myName + myExtension );
 
index 201a2034f2be6b763a759f674e95e7939ad37e0b..24c7a65ddf7191dde9bb1e9414bf034842dbf62f 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO ?OCC24296 ALL: OCC309: Error 2"
-
 puts "================"
 puts "OCC309"
 puts "================"