Browse Source

Merge "Revert "Close unfinished archive entries on error""

stable-3.2
Dave Borowitz 11 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
17dc02a579
  1. 7
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
  2. 7
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java

7
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java

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

7
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java

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

Loading…
Cancel
Save