fix for the linux version mini explorer not limited to /home/ anymore

This commit is contained in:
Basile Burg 2015-05-23 10:45:03 +02:00
parent 8a0aa40f5f
commit d489dd8274
2 changed files with 9 additions and 4 deletions

View File

@ -639,8 +639,7 @@ begin
end;
{$ENDIF}
{$IFDEF LINUX}
// aList.LoadFromFile('/etc/fstab'); // to be parsed
aList.Add('/home/'); //TODO-cbugfix: AV when scanning non-users folder (e.g replace '/home/'' with '/')
aList.Add('//');
{$ENDIF}
end;

View File

@ -73,7 +73,7 @@ type
constructor create(aIwner: TComponent); override;
destructor destroy; override;
//
procedure expandPath(const aPath: string);
procedure expandPath(aPath: string);
end;
implementation
@ -436,9 +436,11 @@ begin
if Tree.Selected = nil then exit;
if Tree.Selected.Expanded then exit;
treeScanSubFolders(Tree.Selected);
//
getMessageDisplay.message(PString(Tree.Selected.Data)^ , nil, amcAll, amkBub);
end;
procedure TCEMiniExplorerWidget.expandPath(const aPath: string);
procedure TCEMiniExplorerWidget.expandPath(aPath: string);
var
i: NativeInt;
node : TTreeNode;
@ -448,6 +450,10 @@ var
str: string;
begin
result := false;
{$IFDEF LINUX}
if (length(aPath) >= 2) and (aPath[2] <> '/') then
aPath := '/' + aPath;
{$ENDIF}
for i := 0 to aRoot.Count-1 do
begin
str := PString(aRoot.Items[i].Data)^;