From fb00c0e25357a5acc09944e8500f5eb1abd7ba44 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 1 Jul 2007 09:56:55 +0000 Subject: [PATCH] * fixed case aware file searching in case filename also contains a path (fixes webtbs/tw1279 regression after yesterday's changes) git-svn-id: trunk@7891 - --- compiler/cfileutl.pas | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/cfileutl.pas b/compiler/cfileutl.pas index a26426520f..3e7796df19 100644 --- a/compiler/cfileutl.pas +++ b/compiler/cfileutl.pas @@ -321,7 +321,11 @@ implementation Result:=false; CachedDir:=GetDirectory(ExtractFileDir(AName)); if assigned(CachedDir) then - Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName); + begin + Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName); + if Result then + FoundName:=ExtractFilePath(AName)+FoundName; + end; end; @@ -505,11 +509,8 @@ implementation if allowcache then begin result:=DirCache.FileExistsCaseAware(FoundFile,fn2); - if (result) then - begin - FoundFile:=path+fn2; - exit - end + if result then + exit end else {$endif usedircache} @@ -517,7 +518,7 @@ implementation begin { don't know the real name in this case } result:=true; - exit; + exit; end; end else