Closed xtomino closed 3 months ago
Hi xtomino, Please try with the following: At the beginning of the Close() method add the following code:
if (Files.Count == 0)
return;
Let me know if it works
Hi jaime-olivares,
I have tried it and I can confirm that it works. BUT it was expected, because the ZIP file remained intact ;-) Unfortunately, I found an another bug. I have used the same code snippet.
Steps to reproduce:
Thank you very much for developing ZipStorer. I have used it in several apps and until now I haven't encountered a problem.
In my last project I needed check a content of archive before add new files to avoid duplicate file names in that archive. I find out if I read an archive content and then I add no files into it to avoid duplicates causes an archive corruption.
See my test code. After first run a new archive is created. After second run an existing archive is opened and after check for duplicate file names in archive no files are added. And after that the whole archive is corrupted! And I opened only an existing archive, then I read its content, I wrote down no files and in the end I close it.
Do you have an idea where the problem might be?