Browse Source
If we encounter an I/O error while writing an archive (for example due to the reader of an HTTP stream closing the connection), the result is an archive with unclosed entries, causing TarArchiveOutputStream.finish() to throw IOException("This archives contains unclosed entries"), hiding the IOException that caused the early termination. The unclosed entries are fine: the same exception that occured in the first place will probably prevent closing the entries before finishing this partial archive that should be discarded anyway. It would be nicer to call TarArchiveOutputStream.finish and leave the underlying OutputStream unclosed --- all callers close it already --- but that would be a more invasive change so we hold off for now. Change-Id: I328ced19aa8a1888e5353cdbb6106a85fd72d5d7 Signed-off-by: Jonathan Nieder <jrn@google.com>stable-3.2
Jonathan Nieder
11 years ago
1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue