physical/file: open for writing
This commit is contained in:
parent
fcde0fa942
commit
1d7f78d3f3
|
@ -84,7 +84,10 @@ func (b *FileBackend) Put(entry *Entry) error {
|
|||
}
|
||||
|
||||
// JSON encode the entry and write it
|
||||
f, err := os.OpenFile(filepath.Join(path, key), os.O_CREATE|os.O_TRUNC, 0600)
|
||||
f, err := os.OpenFile(
|
||||
filepath.Join(path, key),
|
||||
os.O_CREATE|os.O_TRUNC|os.O_WRONLY,
|
||||
0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue