Merge pull request #17547 from LK4D4/unn_stat
Remove unnecessary Stat check from readHostConfig
This commit is contained in:
commit
6d8aff07ac
1 changed files with 3 additions and 5 deletions
|
@ -150,13 +150,11 @@ func (container *Container) readHostConfig() error {
|
|||
return err
|
||||
}
|
||||
|
||||
_, err = os.Stat(pth)
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
f, err := os.Open(pth)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
|
Loading…
Add table
Reference in a new issue