physical/file: open for writing

This commit is contained in:
Mitchell Hashimoto 2015-04-29 11:31:59 -07:00
parent fcde0fa942
commit 1d7f78d3f3
1 changed files with 4 additions and 1 deletions

View File

@ -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
}