1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
ski
dcca9bc55a Removed unnecessary slash at the end of path returned by method CurrentDirectory of OSD_Process class 2016-09-28 18:09:28 +03:00
ski
ea4f4dcf77 0024296: Test "bugs fclasses bug309" is crashed if current directory is into disc-root
Fixed incorrect inclusion of slash symbol to the path.
2016-09-26 12:53:39 +03:00
3 changed files with 5 additions and 8 deletions

View 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 );

View File

@@ -133,7 +133,6 @@ TCollection_AsciiString Name;
result.SetValues("","","",Disk,Directory,"","");
}
#else
Name += TCollection_AsciiString("/");
result = OSD_Path(Name);
// result.SetValues("","","","",Name,"","");
#endif

View File

@@ -1,5 +1,3 @@
puts "TODO ?OCC24296 ALL: OCC309: Error 2"
puts "================"
puts "OCC309"
puts "================"
@@ -25,8 +23,8 @@ if { ${ll} != 2 } {
set CurrentDirectory [ string range $CurrentDirectory 2 [expr [string length $CurrentDirectory] -1 ]]
set UpTrek [ string range $UpTrek 2 [expr [string length $UpTrek] -1 ]]
} else {
set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ]
set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ]
set res1 [ string range $result1 1 [expr [string length $result1] -2 ] ]
set res2 [ string range $result2 1 [expr [string length $result2] -2 ] ]
}
if {[string compare ${res1} "${CurrentDirectory}"] == 0} {
puts "OCC309: OK 1"