archive: cleanup and more information
Signed-off-by: Vincent Batts <vbatts@redhat.com> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
4a2fb0ab3d
commit
74b38deaa9
2 changed files with 6 additions and 3 deletions
|
@ -333,6 +333,8 @@ func ChangesDirs(newDir, oldDir string) ([]Change, error) {
|
|||
newRoot, err2 = collectFileInfo(newDir)
|
||||
errs <- err2
|
||||
}()
|
||||
|
||||
// block until both routines have returned
|
||||
for i := 0; i < 2; i++ {
|
||||
if err := <-errs; err != nil {
|
||||
return nil, err
|
||||
|
@ -409,7 +411,9 @@ func ExportChanges(dir string, changes []Change) (Archive, error) {
|
|||
if err := ta.TarWriter.Close(); err != nil {
|
||||
log.Debugf("Can't close layer: %s", err)
|
||||
}
|
||||
writer.Close()
|
||||
if err := writer.Close(); err != nil {
|
||||
log.Debugf("failed close Changes writer: %s", err)
|
||||
}
|
||||
}()
|
||||
return reader, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue