Revert "Close unfinished archive entries on error"

This reverts commit 75d9b31f14.
Now that we do not try to close the ArchiveOutputStream in the error
path, there is no need to artificially close partial entries from
before the error.

Change-Id: I1f1cb08ec4e9b14c79bf4621f3fa959463034b82
Signed-off-by: Jonathan Nieder <jrn@google.com>
This commit is contained in:
Jonathan Nieder 2013-09-23 17:35:15 -07:00
parent 8a51c4453d
commit 3467e865ac
2 changed files with 4 additions and 10 deletions

View File

@ -93,11 +93,8 @@ public void putEntry(ArchiveOutputStream out,
}
entry.setSize(loader.getSize());
out.putArchiveEntry(entry);
try {
loader.copyTo(out);
} finally {
out.closeArchiveEntry();
}
loader.copyTo(out);
out.closeArchiveEntry();
}
public Iterable<String> suffixes() {

View File

@ -82,11 +82,8 @@ public void putEntry(ArchiveOutputStream out,
}
entry.setSize(loader.getSize());
out.putArchiveEntry(entry);
try {
loader.copyTo(out);
} finally {
out.closeArchiveEntry();
}
loader.copyTo(out);
out.closeArchiveEntry();
}
public Iterable<String> suffixes() {