summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-03-08 15:25:03 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-03-08 15:25:03 +0100
commite63a6e8f6daadb8d7ab7ab7e99099fb2fee62c3c (patch)
treef160b2a3e1339d5dffb74a3d006c46bbfa238a9d
parent2de0a7945bf5941cf0a163b86fa8facbb5b05f2d (diff)
downloadtuxcmd-e63a6e8f6daadb8d7ab7ab7e99099fb2fee62c3c.tar.xz
Search: match archives with multiple extensions correctlyv0.6.62
-rw-r--r--UConfig.pas4
-rw-r--r--USearch.pas23
2 files changed, 7 insertions, 20 deletions
diff --git a/UConfig.pas b/UConfig.pas
index 3e2ab55..8bfa398 100644
--- a/UConfig.pas
+++ b/UConfig.pas
@@ -25,8 +25,8 @@ uses Classes, ULocale;
resourcestring
ConstAppTitle = 'Tux Commander';
- ConstAboutVersion = '0.6.61-dev';
- ConstAboutBuildDate = '2008-11-23';
+ ConstAboutVersion = '0.6.62-dev';
+ ConstAboutBuildDate = '2009-03-08';
{$IFDEF FPC}
{$INCLUDE fpcver.inc}
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;