mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-27 21:31:52 +01:00
* 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 -
This commit is contained in:
parent
096d5b8485
commit
fb00c0e253
@ -321,7 +321,11 @@ implementation
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
CachedDir:=GetDirectory(ExtractFileDir(AName));
|
CachedDir:=GetDirectory(ExtractFileDir(AName));
|
||||||
if assigned(CachedDir) then
|
if assigned(CachedDir) then
|
||||||
|
begin
|
||||||
Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName);
|
Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName);
|
||||||
|
if Result then
|
||||||
|
FoundName:=ExtractFilePath(AName)+FoundName;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -505,12 +509,9 @@ implementation
|
|||||||
if allowcache then
|
if allowcache then
|
||||||
begin
|
begin
|
||||||
result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
|
result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
|
||||||
if (result) then
|
if result then
|
||||||
begin
|
|
||||||
FoundFile:=path+fn2;
|
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
{$endif usedircache}
|
{$endif usedircache}
|
||||||
If FileExists(FoundFile,allowcache) then
|
If FileExists(FoundFile,allowcache) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user