Skip to content

Commit

Permalink
Merge pull request #10266 from bobrik/no-extra-assertion
Browse files Browse the repository at this point in the history
Not doing extra assertion for io.Closer
  • Loading branch information
Jessie Frazelle committed Jan 22, 2015
2 parents ef33efc + 4d10b32 commit c77c67c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/chrootarchive/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -60,11 +59,7 @@ func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error
return 0, err
}

defer func() {
if c, ok := decompressed.(io.Closer); ok {
c.Close()
}
}()
defer decompressed.Close()

cmd := reexec.Command("docker-applyLayer", dest)
cmd.Stdin = decompressed
Expand Down

0 comments on commit c77c67c

Please sign in to comment.