mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Disable create archive inside other archive (function not supported)
This commit is contained in:
parent
afa1f40635
commit
0c49b02fb2
1 changed files with 27 additions and 18 deletions
|
|
@ -1418,30 +1418,39 @@ var
|
|||
Param: String;
|
||||
TargetPath: String;
|
||||
SelectedFiles: TFiles;
|
||||
TargetFileSource: IFileSource;
|
||||
begin
|
||||
with frmMain do
|
||||
begin
|
||||
SelectedFiles := ActiveFrame.CloneSelectedOrActiveFiles;
|
||||
try
|
||||
if SelectedFiles.Count = 0 then
|
||||
msgWarning(rsMsgNoFilesSelected)
|
||||
else begin
|
||||
Param := GetDefaultParam(Params);
|
||||
if Param = 'PackHere' then
|
||||
TargetPath:= ActiveFrame.CurrentPath
|
||||
Param := GetDefaultParam(Params);
|
||||
if Param = 'PackHere' then
|
||||
begin
|
||||
TargetPath:= ActiveFrame.CurrentPath;
|
||||
TargetFileSource:= ActiveFrame.FileSource;
|
||||
end
|
||||
else begin
|
||||
TargetPath:= NotActiveFrame.CurrentPath;
|
||||
TargetFileSource:= NotActiveFrame.FileSource;
|
||||
end;
|
||||
if not (fspDirectAccess in TargetFileSource.Properties) then
|
||||
msgError(rsMsgErrNotSupported)
|
||||
else begin
|
||||
SelectedFiles := ActiveFrame.CloneSelectedOrActiveFiles;
|
||||
try
|
||||
if SelectedFiles.Count = 0 then
|
||||
msgWarning(rsMsgNoFilesSelected)
|
||||
else begin
|
||||
TargetPath:= NotActiveFrame.CurrentPath;
|
||||
ShowPackDlg(frmMain,
|
||||
ActiveFrame.FileSource,
|
||||
nil, // No specific target (create new)
|
||||
SelectedFiles,
|
||||
TargetPath,
|
||||
PathDelim { Copy to root of archive } {NotActiveFrame.FileSource.GetRootString}
|
||||
);
|
||||
end;
|
||||
ShowPackDlg(frmMain,
|
||||
ActiveFrame.FileSource,
|
||||
nil, // No specific target (create new)
|
||||
SelectedFiles,
|
||||
TargetPath,
|
||||
PathDelim { Copy to root of archive } {NotActiveFrame.FileSource.GetRootString}
|
||||
);
|
||||
finally
|
||||
FreeAndNil(SelectedFiles);
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(SelectedFiles);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue