From a12d2503d0c17e329d59d2ab3c7e2b1bc55f92ac Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Feb 2011 11:05:24 +0000 Subject: [PATCH] 2011-02-11 12:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/hbfilehi.prg ! Fixed HB_PATHNORMALIZE() recent change to strip double pathseps. It was slashing ending pathsep too, which caused hbmk2 env detection to die and not find libs. NOTE: HB_PATHNORMALIZE() got very inefficient after this addition, so if I may chose to restore stable versions from hbmk2 code. ; There are at least two remaining bugs in recent changes. --- harbour/ChangeLog | 9 +++++++++ harbour/src/rtl/hbfilehi.prg | 2 ++ 2 files changed, 11 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9a6dd657d4..7098009a5c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-11 12:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbfilehi.prg + ! Fixed HB_PATHNORMALIZE() recent change to strip double pathseps. + It was slashing ending pathsep too, which caused hbmk2 env detection + to die and not find libs. + NOTE: HB_PATHNORMALIZE() got very inefficient after this addition, + so if I may chose to restore stable versions from hbmk2 code. + ; There are at least two remaining bugs in recent changes. + 2011-02-11 07:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Readded REQUEST HB_FSETATTR. It was used in conditional diff --git a/harbour/src/rtl/hbfilehi.prg b/harbour/src/rtl/hbfilehi.prg index 216218ac2d..c6d9c589b0 100644 --- a/harbour/src/rtl/hbfilehi.prg +++ b/harbour/src/rtl/hbfilehi.prg @@ -75,9 +75,11 @@ FUNCTION hb_PathNormalize( cPath ) FOR EACH cDir IN aDir DESCEND IF cDir == "." .OR. ; ( Empty( cDir ) .AND. ; + cDir:__enumIndex() < Len( cDir:__enumBase() ) .AND. ; ( cDir:__enumIndex() > 2 .OR. ; ( cDir:__enumIndex() == 2 .AND. ! Empty( aDir[ 1 ] ) ) ) ) hb_ADel( aDir, cDir:__enumIndex(), .T. ) + hb_ADel( aDir, cDir:__enumIndex(), .T. ) ELSEIF !( cDir == ".." ) .AND. ; ! Empty( cDir ) .AND. ; ! _ISDRIVESPEC( cDir )