audit/file: Create file if it does not exist. Fixes #148

This commit is contained in:
Armon Dadgar 2015-05-06 11:33:06 -07:00
parent 2c8ecd53bc
commit 70ae9323e2

View file

@ -132,7 +132,7 @@ func (b *Backend) open() error {
}
var err error
b.f, err = os.OpenFile(b.Path, os.O_APPEND|os.O_WRONLY, 0600)
b.f, err = os.OpenFile(b.Path, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
return err
}