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

0023852: OSD_Path interprets unc paths incorrectly

checking for unc path on Windows was added
change deprecated macro WNT to _WIN32
Adding test case for this fix
This commit is contained in:
ika
2013-03-29 12:15:13 +04:00
committed by bugmaster
parent b92d758fec
commit 802ea1e6fd
2 changed files with 80 additions and 2 deletions

View File

@@ -1582,10 +1582,14 @@ static void __fastcall _remove_dup ( TCollection_AsciiString& str ) {
static Standard_Integer RemoveExtraSeparator(TCollection_AsciiString& aString) {
Standard_Integer i, j, len ;
Standard_Integer i, j, len,start = 1 ;
len = aString.Length() ;
for (i = j = 1 ; j <= len ; i++,j++) {
#ifdef _WIN32
if (len > 1 && aString.Value(1) == '/' && aString.Value(2) == '/')
start = 2;
#endif
for (i = j = start ; j <= len ; i++,j++) {
Standard_Character c = aString.Value(j) ;
aString.SetValue(i,c) ;
if (c == '/')