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

Remove duplicate config file creation.

When `toDisk` is called, it is creating a file already, no need to
create it here.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2015-04-07 21:36:30 -04:00
parent 06433cf812
commit 24057777af

View file

@ -102,15 +102,6 @@ func (v *Volume) initialize() error {
if err := os.MkdirAll(v.configPath, 0755); err != nil {
return err
}
jsonPath, err := v.jsonPath()
if err != nil {
return err
}
f, err := os.Create(jsonPath)
if err != nil {
return err
}
defer f.Close()
return v.toDisk()
}