summaryrefslogtreecommitdiff
path: root/USearch.pas
diff options
context:
space:
mode:
Diffstat (limited to 'USearch.pas')
-rw-r--r--USearch.pas8
1 files changed, 5 insertions, 3 deletions
diff --git a/USearch.pas b/USearch.pas
index 2859de4..d09c330 100644
--- a/USearch.pas
+++ b/USearch.pas
@@ -557,20 +557,21 @@ begin
end;
procedure TFSearch.ViewButtonClick(Sender: TObject);
-var AViewer: TViewerThread;
- AEngine: TPanelEngine;
+var AEngine: TPanelEngine;
Plugin: TVFSPlugin;
b: boolean;
archive, s: string;
i, j: integer;
begin
if not (Assigned(FileList.Selected) and Assigned(FileList.Selected.AsPointer(0))) then Exit;
+ AEngine := nil;
if Assigned(PDataItem(FileList.Selected.AsPointer(0))^.LnkPointTo) then begin
archive := string(PDataItem(FileList.Selected.AsPointer(0))^.LnkPointTo);
b := False;
s := ANSIUpperCase(Trim(Copy(archive, LastDelimiter('.', archive) + 1, Length(archive) - LastDelimiter('.', archive))));
if (Length(s) > 1) and (s[1] = '.') then Delete(s, 1, 1);
- if PluginList.Count > 0 then
+ if PluginList.Count > 0 then begin
+ Plugin := nil;
for i := 0 to PluginList.Count - 1 do begin
Plugin := TVFSPlugin(PluginList[i]);
if Length(Plugin.Extensions) > 0 then
@@ -587,6 +588,7 @@ begin
(AEngine as TVFSEngine).ArchiveMode := True;
b := b and ((AEngine as TVFSEngine).VFSOpenEx(archive) = 0);
end;
+ end;
end else begin
AEngine := TLocalTreeEngine.Create;
b := True;