ADD: Smart extract option (issue #3)

This commit is contained in:
Alexander Koblov 2022-11-05 19:31:06 +03:00
commit 4a13fe207e
2 changed files with 7 additions and 0 deletions

View file

@ -143,6 +143,7 @@ inherited frmExtractDlg: TfrmExtractDlg
Height = 26
Top = 6
Width = 446
AllowGrayed = True
BorderSpacing.Top = 2
Caption = 'Unpack each archive to a &separate subdir (name of the archive)'
TabOrder = 0

View file

@ -278,6 +278,12 @@ begin
// Set operation specific options
if Assigned(Operation) then
begin
if cbInSeparateFolder.State = cbGrayed then
begin
with Operation as TArchiveCopyOutOperation do
ExtractFlags:= ExtractFlags + [efSmartExtract];
end;
if ArchiveFileSource.IsInterface(IMultiArchiveFileSource) then
begin
with Operation as TMultiArchiveCopyOutOperation do