remicuson / winzipaes

Automatically exported from code.google.com/p/winzipaes
0 stars 0 forks source link

ExtZipOutputStream zipOS stream is not closed #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. File tempEncrFile = new File(zipFile.getPath() + ".enc");
2. AesZipFileEncrypter enc = new AesZipFileEncrypter(tempEncrFile, new 
AESEncrypterBC());
3. enc.add(zipFile, password);
4. zipFile.delete();
5. tempEncrFile.renameTo(zipFile);

What is the expected output? What do you see instead?
tempEncrFile.renameTo(zipFile) returns false, and there is no renaming

What version of the product are you using? On what operating system?
winzipaes_src_20120319.zip on Windows 7

Please provide any additional information below.
zipOS.writeBytes(finalAuthentication);
+ zipOS.finish();
+ zipOS.close();
Two last strings solves problem

Original issue reported on code.google.com by k.vilegz...@gmail.com on 26 Mar 2012 at 3:10

GoogleCodeExporter commented 8 years ago
Is it possible, you've missed this javadoc/comment on AesZipFileEncrypter?

One instance of this class represents one encrypted ZIP file, that can receive 
add() method calls that must be followed by one final call to close() to write 
the final archive part and close the output stream.

An alternative to the add() - which can be called multiple times - followed by 
a call to close() are the 2 static methods of AesZipFileEncrypter for "single 
file" processing.

Original comment by olaf.merkert on 26 Mar 2012 at 5:19

GoogleCodeExporter commented 8 years ago
closed as "NeedInfo" request was not answered

Original comment by olaf.merkert on 16 Apr 2012 at 8:48