TZipper: When "Filename" has ".tmp" extension causes an error
Original Reporter info from Mantis: dgaspary @dgaspary
-
Reporter name: Daniel Gaspary
Original Reporter info from Mantis: dgaspary @dgaspary
- Reporter name: Daniel Gaspary
Description:
The code bellow(ZipOneFile Method) try to create a temporary file with the same name of destination file:
TmpFileName:=ChangeFileExt(FFileName,'.tmp');
ZipStream:=TFileStream.Create(TmpFileName,fmCreate);
Steps to reproduce:
with TZipper.Create do
begin
Filename:='/tmp/outfile.tmp';
Entries.AddFileEntry(<srcFile>, <archiveName>);
//<srcFile> must be a file greater than 256k(DefaultInMemSize)
Free;
end;
Mantis conversion info:
- Mantis ID: 24051
- OS: Linux
- OS Build: Ubuntu 11.04
- Platform: x86-64
- Version: 2.6.2
- Fixed in version: 3.0.0
- Fixed in revision: 25567 (#c3476067)
- Target version: 2.6.4