1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #26186 from ywk253100/master

Fixes #25654, a bug in implements of loading image
This commit is contained in:
Brian Goff 2016-08-31 22:07:01 -04:00 committed by GitHub
commit 7776a0ebd7

View file

@ -52,7 +52,7 @@ func (l *tarexporter) Load(inTar io.ReadCloser, outStream io.Writer, quiet bool)
if os.IsNotExist(err) {
return l.legacyLoad(tmpDir, outStream, progressOutput)
}
return manifestFile.Close()
return err
}
defer manifestFile.Close()
@ -230,10 +230,7 @@ func (l *tarexporter) legacyLoad(tmpDir string, outStream io.Writer, progressOut
}
repositoriesFile, err := os.Open(repositoriesPath)
if err != nil {
if !os.IsNotExist(err) {
return err
}
return repositoriesFile.Close()
return err
}
defer repositoriesFile.Close()