mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Empty panel then can not read directory content
This commit is contained in:
parent
33131e2e28
commit
2e39882acf
1 changed files with 6 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ const
|
|||
|
||||
implementation
|
||||
uses
|
||||
uFileProcs, uFindEx, uGlobs, uOSUtils {$IFDEF UNIX}, uUsersGroups, Unix, BaseUnix{$ENDIF}
|
||||
uFileProcs, uFindEx, uGlobs, uDCUtils, uVFSUtil, uOSUtils {$IFDEF UNIX}, uUsersGroups, Unix, BaseUnix{$ENDIF}
|
||||
{$IFDEF WINDOWS}, Windows {$ENDIF};
|
||||
|
||||
{$IFDEF UNIX} // *nix
|
||||
|
|
@ -197,15 +197,19 @@ function LoadFilesbyDir(const sDir: String; fl: TFileList): Boolean;
|
|||
var
|
||||
fr: TFileRecItem;
|
||||
sr: TSearchRec;
|
||||
sParentDir: UTF8String;
|
||||
begin
|
||||
// DebugLn('Enter LoadFilesbyDir');
|
||||
Result:= False;
|
||||
fl.Clear;
|
||||
fl.CurrentDirectory := IncludeTrailingPathDelimiter(sDir);
|
||||
if FindFirstEx('*',faAnyFile,sr)<>0 then
|
||||
if FindFirstEx('*',faAnyFile,sr) <> 0 then
|
||||
begin
|
||||
{ No files have been found. }
|
||||
FindCloseEx(sr);
|
||||
sParentDir:= GetParentDir(sDir);
|
||||
if sParentDir <> EmptyStr then // if parent dir exists then add up level item
|
||||
AddUpLevel(sParentDir, fl);
|
||||
Exit;
|
||||
end;
|
||||
repeat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue