FIX: Unpacking file from zip with entering empty destination (fixes #826)

(cherry picked from commit 09762d955d)
This commit is contained in:
Alexander Koblov 2023-02-23 14:11:01 +03:00
commit 94cc42cabe

View file

@ -3446,6 +3446,7 @@ function TfrmMain.CopyFiles(SourceFileSource, TargetFileSource: IFileSource;
bShowDialog: Boolean;
QueueIdentifier: TOperationsManagerQueueIdentifier): Boolean;
var
BaseDir: String;
sDestination: String;
sDstMaskTemp: String;
FileSource: IFileSource;
@ -3538,9 +3539,15 @@ begin
sDestination := CopyDialog.edtDst.Text;
if SourceFileSource.IsClass(TArchiveFileSource) then
BaseDir := ExtractFilePath(SourceFileSource.CurrentAddress)
else begin
BaseDir := SourceFiles.Path;
end;
GetDestinationPathAndMask(SourceFiles, SourceFileSource,
TargetFileSource, sDestination,
SourceFiles.Path, TargetPath, sDstMaskTemp);
BaseDir, TargetPath, sDstMaskTemp);
if (TargetFileSource = nil) or (Length(TargetPath) = 0) then
begin