Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit c2532d5

Browse files
committed
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 <[email protected]>
1 parent f6f58f3 commit c2532d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

volume/local/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (r *Root) Create(name string, opts map[string]string) (volume.Volume, error
172172
if err != nil {
173173
return nil, err
174174
}
175-
if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 600); err != nil {
175+
if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 0600); err != nil {
176176
return nil, errdefs.System(errors.Wrap(err, "error while persisting volume options"))
177177
}
178178
}

0 commit comments

Comments
 (0)