From f676ed4d83eaeccac43a4e061b8d6fa3ed24444d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 29 Apr 2015 11:31:59 -0700 Subject: [PATCH] physical/file: open for writing --- physical/file.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/physical/file.go b/physical/file.go index d8d1d306c7..14fdb7122c 100644 --- a/physical/file.go +++ b/physical/file.go @@ -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 }