From b522b1da03e3fe385e9b114c92511908be9cca30 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 22 Jul 2014 21:56:18 +0200 Subject: [PATCH] fixed file scanning error under linux --- src/ce_common.pas | 8 ++++---- src/ce_miniexplorer.pas | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ce_common.pas b/src/ce_common.pas index 01495edd..564d186a 100644 --- a/src/ce_common.pas +++ b/src/ce_common.pas @@ -467,7 +467,7 @@ end; function isFolder(sr: TSearchRec): boolean; begin - result := (sr.Name <> '.') and (sr.Name <> '..' )and (sr.Name <> '' ) and + result := (sr.Name <> '.') and (sr.Name <> '..' ) and (sr.Name <> '' ) and (sr.Attr and faDirectory = faDirectory); end; @@ -480,7 +480,7 @@ begin aList.Add(aPath + directorySeparator + sr.Name); end; begin - if findFirst(aPath + directorySeparator + '*.*', faAnyFile, sr) = 0 then + if findFirst(aPath + directorySeparator + '*', faAnyFile, sr) = 0 then try repeat tryAdd; @@ -497,7 +497,7 @@ procedure listFolders(const aList: TStrings; const aPath: string); var sr: TSearchrec; begin - if findFirst(aPath + '*.*', faDirectory, sr) = 0 then + if findFirst(aPath + '*', faDirectory, sr) = 0 then try repeat if isFolder(sr) then aList.Add(aPath + sr.Name); @@ -513,7 +513,7 @@ var res: boolean; begin res := false; - if findFirst(aPath + directorySeparator + '*.*', faDirectory, sr) = 0 then + if findFirst(aPath + directorySeparator + '*', faDirectory, sr) = 0 then try repeat if isFolder(sr) then begin diff --git a/src/ce_miniexplorer.pas b/src/ce_miniexplorer.pas index a5c0c27a..786dad98 100644 --- a/src/ce_miniexplorer.pas +++ b/src/ce_miniexplorer.pas @@ -68,7 +68,6 @@ uses ce_main, ce_common; //TODO-cbugfix: click on the expander glyph, sometime the subdirs are not scanned but the fake sub item is still displayed -//TODO-cfeature: the linux version doesnt work at all {$REGION Standard Comp/Obj------------------------------------------------------} constructor TCEMiniExplorerWidget.create(aIwner: TComponent);