From: ski Date: Fri, 23 Sep 2016 14:06:12 +0000 (+0300) Subject: 0024296: Test "bugs fclasses bug309" is crashed if current directory is into disc... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=1ae262d9befcfdeff6d7a1e9ebe60f62f607126b;p=occt-copy.git 0024296: Test "bugs fclasses bug309" is crashed if current directory is into disc-root Fixed incorrect inclusion of slash symbol to the path. --- diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index 5ceb3669b1..5794e3d371 100644 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -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 ); diff --git a/tests/bugs/fclasses/bug309 b/tests/bugs/fclasses/bug309 index 201a2034f2..24c7a65ddf 100644 --- a/tests/bugs/fclasses/bug309 +++ b/tests/bugs/fclasses/bug309 @@ -1,5 +1,3 @@ -puts "TODO ?OCC24296 ALL: OCC309: Error 2" - puts "================" puts "OCC309" puts "================"