mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove unnecessary Stat check from readHostConfig
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
23a0fe9627
commit
36a69bbc60
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…
Reference in a new issue