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
1 changed files with 2 additions and 5 deletions

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()