Skip to content

Commit

Permalink
Clean RAR Archive after closing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebrait committed Feb 24, 2022
1 parent 86a4f49 commit 166b559
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public ArchiveSourceInternalSpec getNextInternalSpec() throws IOException {
}
}
} else {
if (namesIterator == null) {
namesIterator = names.iterator();
}
if (fileHeaders == null) {
fileHeaders = archive.getFileHeaders();
}
if (namesIterator == null) {
namesIterator = names.iterator();
}
if (namesIterator.hasNext()) {
String name = namesIterator.next();
return getValidFileHeader(name);
Expand Down Expand Up @@ -111,6 +111,7 @@ private boolean isFile(FileHeader fileHeader) {

@Override
public void close() throws IOException {
fileHeaders = null;
namesIterator = null;
if (archive != null) {
archive.close();
Expand Down

0 comments on commit 166b559

Please sign in to comment.