ADD: support search files in SearchResultFileSource

This commit is contained in:
rich2014 2026-06-01 21:20:30 +08:00
commit b1426fd06d
2 changed files with 13 additions and 10 deletions

View file

@ -545,8 +545,7 @@ begin
FreeAndNil(ASelectedFiles);
end;
(FileView.FileSource as ILocalFileSource).AddSearchPath(
FileView.CurrentRealPath, FSelectedFiles );
FileView.FileSource.AddSearchPath( FileView.CurrentRealPath, FSelectedFiles );
FindInArchive(FileView);
@ -1741,15 +1740,18 @@ begin
if cbFindInArchive.Enabled then
begin
if (cmbFindPathStart.Text = '') then begin
cmbFindPathStart.Text:= mbGetCurrentDir;
end;
for sPath in SplitPath(cmbFindPathStart.Text) do
if FFileSource.IsClass(TFileSystemFileSource) then
begin
if not mbDirectoryExists(sPath) then
if (cmbFindPathStart.Text = '') then begin
cmbFindPathStart.Text:= mbGetCurrentDir;
end;
for sPath in SplitPath(cmbFindPathStart.Text) do
begin
ShowMessage(Format(rsFindDirNoEx, [sPath]));
Exit;
if not mbDirectoryExists(sPath) then
begin
ShowMessage(Format(rsFindDirNoEx, [sPath]));
Exit;
end;
end;
end;
end;

View file

@ -3546,7 +3546,8 @@ var
TemplateName: String;
begin
if not (frmMain.ActiveFrame.FileSource.IsClass(TFileSystemFileSource) or
frmMain.ActiveFrame.FileSource.IsClass(TWcxArchiveFileSource)) then
frmMain.ActiveFrame.FileSource.IsClass(TWcxArchiveFileSource) or
frmMain.ActiveFrame.FileSource.IsClass(TSearchResultFileSource) ) then
begin
msgError(rsMsgErrNotSupported)
end