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.
This commit is contained in:
Viktor Szakats
2011-01-31 21:51:02 +00:00
parent f35f4e319c
commit b96ebc81ea
2 changed files with 9 additions and 1 deletions

View File

@@ -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.

View File

@@ -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. ;