summaryrefslogtreecommitdiff
path: root/volume
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2019-08-05 16:03:24 +0200
committerSebastiaan van Stijn <github@gone.nl>2019-09-18 12:55:47 +0200
commitc2532d56b0c80a0300d9aae9c24c3ba077bab2a9 (patch)
treee2fa4e51f830d27c33a218742f02cac008b3924d /volume
parentf6f58f38586b5e166e3ee99b63d6856441bfe422 (diff)
downloaddocker-c2532d56b0c80a0300d9aae9c24c3ba077bab2a9.tar.gz
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>
Diffstat (limited to 'volume')
-rw-r--r--volume/local/local.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/volume/local/local.go b/volume/local/local.go
index 6dc894873d..e587814d19 100644
--- a/volume/local/local.go
+++ b/volume/local/local.go
@@ -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"))
}
}