I am using Apache commons-compress 1.12 to compress a folder. The parent folder that I am trying to compress has files and more subfolders with files. After compressing, I am trying to place the compressed file in the parent folder itself. I have written code that is written in the answer of
http://stackoverflow.com/questions/13461393/compress-directory-to-tar-gz-with-commons-compress
But I am getting an error - java.io.IOException: This archives contains unclosed entries
. I am using version 2.5 of apache commons-io. What could be the reason for the error?
I had this issue when I could not access the file that was being archived. It was a permission issue. After changing the file permissions to 644, everything worked again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With