zip4j icon indicating copy to clipboard operation
zip4j copied to clipboard

exception Zip4j is in busy state

Open XuXin007 opened this issue 3 years ago • 0 comments

I appreciate the open source code you provided I like it very much.the problem i'm having. Zip all files in the current folder throw exception net.lingala.zip4j.exception.ZipException: invalid operation - Zip4j is in busy state. Below is the code I wrote I don't know where is the problem
private void forEachDirectory(File currentFile, ZipFile zipFile) throws ZipException { File[] listFiles = currentFile.listFiles(); if (listFiles != null) { for (File file : listFiles) { if (file.isDirectory()) { zipFile.addFolder(file); forEachDirectory(file, zipFile); } else { zipFile.addFile(file); } } } }

XuXin007 avatar Jul 01 '22 02:07 XuXin007