diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 839f378899..f2bf3bd495 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-31 22:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbfilehi.prg + + PATHNORMALIZE(): Will now strip double pathseps, except the + UNC root ones. I hope. Pls make tests. + 2011-01-31 22:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog ! Typo in prev. diff --git a/harbour/src/rtl/hbfilehi.prg b/harbour/src/rtl/hbfilehi.prg index 413f4b4ec1..39ef21be3d 100644 --- a/harbour/src/rtl/hbfilehi.prg +++ b/harbour/src/rtl/hbfilehi.prg @@ -74,7 +74,10 @@ FUNCTION hb_PathNormalize( cPath ) aDir := hb_ATokens( cPath, hb_ps() ) FOR EACH cDir IN aDir DESCEND - IF cDir == "." + IF cDir == "." .OR. ; + ( Empty( cDir ) .AND. ; + ( cDir:__enumIndex() > 2 .OR. ; + ( cDir:__enumIndex() == 2 .AND. ! Empty( aDir[ 1 ] ) ) ) ) hb_ADel( aDir, cDir:__enumIndex(), .T. ) ELSEIF !( cDir == ".." ) .AND. ; ! Empty( cDir ) .AND. ;