4

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?

krackoder
  • 2,841
  • 7
  • 42
  • 51
  • Could it be that the compression process is seeing the zip file in the parent folder, and trying to add it to itself? – Steven Jul 07 '16 at 03:31

1 Answers1

2

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.

Marty
  • 539
  • 5
  • 6