1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/archive
Alexander Larsson f198ee525a Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-14 13:46:17 +01:00
..
archive.go Properly close archives 2014-02-14 13:46:17 +01:00
archive_test.go Properly close archives 2014-02-14 13:46:17 +01:00
changes.go archive: Extract code from ExportChanges to addTarFile() 2014-01-20 20:26:20 +01:00
changes_test.go small batch of edits/corrections to comments 2013-12-24 16:40:14 -08:00
diff.go Properly close archives 2014-02-14 13:46:17 +01:00
MAINTAINERS Move archive.go to sub package 2013-10-31 16:57:45 -07:00
stat_linux.go Remove linux specific calls 2014-02-09 04:23:57 -08:00
stat_unsupported.go Remove linux specific calls 2014-02-09 04:23:57 -08:00