mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Detect archive type by content for rar plugin (fixes 0000356)
This commit is contained in:
parent
6aa42bc464
commit
54ddfa27fc
6 changed files with 15 additions and 5 deletions
|
|
@ -65,7 +65,7 @@
|
|||
<WcxPlugin Enabled="True">
|
||||
<ArchiveExt>rar</ArchiveExt>
|
||||
<Path>%commander_path%/plugins/wcx/unrar/unrar.wcx</Path>
|
||||
<Flags>4</Flags>
|
||||
<Flags>68</Flags>
|
||||
</WcxPlugin>
|
||||
</WcxPlugins>
|
||||
<WdxPlugins>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
<WcxPlugin Enabled="True">
|
||||
<ArchiveExt>rar</ArchiveExt>
|
||||
<Path>%commander_path%/plugins/wcx/unrar/unrar.wcx</Path>
|
||||
<Flags>4</Flags>
|
||||
<Flags>68</Flags>
|
||||
</WcxPlugin>
|
||||
</WcxPlugins>
|
||||
<WdxPlugins>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<WcxPlugin Enabled="True">
|
||||
<ArchiveExt>rar</ArchiveExt>
|
||||
<Path>%commander_path%\plugins\wcx\unrar\unrar.wcx</Path>
|
||||
<Flags>4</Flags>
|
||||
<Flags>68</Flags>
|
||||
</WcxPlugin>
|
||||
</WcxPlugins>
|
||||
<WdxPlugins>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ uses
|
|||
SysUtils, DynLibs, UnRARFunc;
|
||||
|
||||
exports
|
||||
{ Mandatory }
|
||||
OpenArchive,
|
||||
OpenArchiveW,
|
||||
ReadHeader,
|
||||
|
|
@ -16,6 +17,9 @@ exports
|
|||
SetChangeVolProcW,
|
||||
SetProcessDataProc,
|
||||
SetProcessDataProcW,
|
||||
{ Optional }
|
||||
GetPackerCaps,
|
||||
{ Extension API }
|
||||
ExtensionInitialize;
|
||||
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ procedure SetChangeVolProc(hArcData : TArcHandle; pChangeVolProc : TChangeVolPro
|
|||
procedure SetChangeVolProcW(hArcData : TArcHandle; pChangeVolProc : TChangeVolProcW);dcpcall;
|
||||
procedure SetProcessDataProc(hArcData : TArcHandle; pProcessDataProc : TProcessDataProc);dcpcall;
|
||||
procedure SetProcessDataProcW(hArcData : TArcHandle; pProcessDataProc : TProcessDataProcW);dcpcall;
|
||||
function GetPackerCaps : Integer; dcpcall;
|
||||
procedure ExtensionInitialize(StartupInfo: PExtensionStartupInfo); dcpcall;
|
||||
|
||||
implementation
|
||||
|
|
@ -686,6 +687,11 @@ begin
|
|||
ProcessDataProcW := pProcessDataProc;
|
||||
end;
|
||||
|
||||
function GetPackerCaps: Integer; dcpcall;
|
||||
begin
|
||||
Result := PK_CAPS_MULTIPLE or PK_CAPS_BY_CONTENT;
|
||||
end;
|
||||
|
||||
procedure ExtensionInitialize(StartupInfo: PExtensionStartupInfo); dcpcall;
|
||||
begin
|
||||
ExtensionStartupInfo := StartupInfo^;
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ begin
|
|||
|
||||
I:= gWCXPlugins.IndexOfName('rar');
|
||||
if I < 0 then
|
||||
gWCXPlugins.Add('rar', 4, Folder + 'unrar' + PathDelim + 'unrar.wcx')
|
||||
gWCXPlugins.Add('rar', 68, Folder + 'unrar' + PathDelim + 'unrar.wcx')
|
||||
else
|
||||
gWCXPlugins.Flags[I]:= 4;
|
||||
gWCXPlugins.Flags[I]:= 68;
|
||||
|
||||
// Wfx plugins
|
||||
Folder:= '%commander_path%' + PathDelim + 'plugins' + PathDelim + 'wfx' + PathDelim;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue