diff options
Diffstat (limited to 'USearch.pas')
| -rw-r--r-- | USearch.pas | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/USearch.pas b/USearch.pas index 763dd41..6fe837d 100644 --- a/USearch.pas +++ b/USearch.pas @@ -104,7 +104,7 @@ var implementation -uses Math, UMain, ULocale, UCoreUtils, UCore, DateUtils, UViewer, UConfig, UVFSCore; +uses Math, UMain, ULocale, UCoreUtils, UCore, DateUtils, UViewer, UConfig, UVFSCore, UFileAssoc; var SizeUnits: array[0..2] of string; DayUnits: array[0..3] of string; @@ -846,9 +846,9 @@ end; procedure TSearchThread.Rekurze(StartDir: string); var LocalList: TList; - i, j, k: integer; + i, j: integer; Matches, b: boolean; - FileName, s: string; + FileName: string; Data: PDataItem; Plugin: TVFSPlugin; xEngine: TVFSEngine; @@ -932,21 +932,8 @@ begin // Handle archives if (not Data^.IsDir) and FSearchArchives and (not (FEngine is TVFSEngine)) then begin - b := False; - s := WideUpperCase(Trim(Copy(FileName, LastDelimiter('.', FileName) + 1, Length(FileName) - LastDelimiter('.', FileName)))); - if (Length(s) > 1) and (s[1] = '.') then Delete(s, 1, 1); - if PluginList.Count > 0 then - for k := 0 to PluginList.Count - 1 do begin - Plugin := TVFSPlugin(PluginList[k]); - if Length(Plugin.Extensions) > 0 then - for j := 0 to Length(Plugin.Extensions) - 1 do - if WideCompareText(Plugin.Extensions[j], s) = 0 then begin - b := True; - Break; - end; - if b then Break; - end; - if b then begin + Plugin := FindVFSPlugin(FileName); + if Plugin <> nil then begin DebugMsg(['Found plugin ''', Plugin.VFSName, ''', trying to open the archive ''', FileName, '''']); xEngine := TVFSEngine.Create(Plugin); xEngine.ParentEngine := FEngine; |
