|
@@ -194,8 +194,8 @@ implementation
|
|
begin
|
|
begin
|
|
repeat
|
|
repeat
|
|
if ((dir.attr and faDirectory)<>faDirectory) or
|
|
if ((dir.attr and faDirectory)<>faDirectory) or
|
|
- (dir.Name<>'.') or
|
|
|
|
- (dir.Name<>'..') then
|
|
|
|
|
|
+ ((dir.Name<>'.') and
|
|
|
|
+ (dir.Name<>'..')) then
|
|
begin
|
|
begin
|
|
if not(tf_files_case_sensitive in source_info.flags) then
|
|
if not(tf_files_case_sensitive in source_info.flags) then
|
|
if (tf_files_case_aware in source_info.flags) then
|
|
if (tf_files_case_aware in source_info.flags) then
|
|
@@ -353,11 +353,22 @@ implementation
|
|
|
|
|
|
|
|
|
|
function TDirectoryCache.FindNext(var Res:TCachedSearchRec):boolean;
|
|
function TDirectoryCache.FindNext(var Res:TCachedSearchRec):boolean;
|
|
|
|
+ var
|
|
|
|
+ entry: PCachedDirectoryEntry;
|
|
begin
|
|
begin
|
|
if Res.EntryIndex<Res.CachedDir.DirectoryEntries.Count then
|
|
if Res.EntryIndex<Res.CachedDir.DirectoryEntries.Count then
|
|
begin
|
|
begin
|
|
- Res.Name:=Res.CachedDir.DirectoryEntries.NameOfIndex(Res.EntryIndex);
|
|
|
|
- Res.Attr:=PtrInt(Res.CachedDir.DirectoryEntries[Res.EntryIndex]);
|
|
|
|
|
|
+ if (tf_files_case_aware in source_info.flags) then
|
|
|
|
+ begin
|
|
|
|
+ entry:=Res.CachedDir.DirectoryEntries[Res.EntryIndex];
|
|
|
|
+ Res.Name:=entry^.RealName;
|
|
|
|
+ Res.Attr:=entry^.Attr;
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ Res.Name:=Res.CachedDir.DirectoryEntries.NameOfIndex(Res.EntryIndex);
|
|
|
|
+ Res.Attr:=PtrInt(Res.CachedDir.DirectoryEntries[Res.EntryIndex]);
|
|
|
|
+ end;
|
|
inc(Res.EntryIndex);
|
|
inc(Res.EntryIndex);
|
|
Result:=true;
|
|
Result:=true;
|
|
end
|
|
end
|
|
@@ -510,7 +521,10 @@ implementation
|
|
begin
|
|
begin
|
|
result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
|
|
result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
|
|
if result then
|
|
if result then
|
|
- exit
|
|
|
|
|
|
+ begin
|
|
|
|
+ FoundFile:=fn2;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
{$endif usedircache}
|
|
{$endif usedircache}
|