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

volume Create: fix incorrect file permissions (staticcheck)

```
14:01:54 volume/local/local.go:175:80: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
14:01:54 		if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 600); err != nil {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-08-05 16:03:24 +02:00
parent f6f58f3858
commit c2532d56b0
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -172,7 +172,7 @@ func (r *Root) Create(name string, opts map[string]string) (volume.Volume, error
if err != nil {
return nil, err
}
if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 600); err != nil {
if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 0600); err != nil {
return nil, errdefs.System(errors.Wrap(err, "error while persisting volume options"))
}
}