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:
commit
7776a0ebd7
1 changed files with 2 additions and 5 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue