diff options
author | Ben Burwell <ben@benburwell.com> | 2019-08-13 13:08:23 -0400 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2019-08-13 13:08:23 -0400 |
commit | 2fde66440ea282532bb1a8e0380e32d331302e39 (patch) | |
tree | 8ba7cad6de673a60493f9b87db3a489ded66821b /apply.go | |
parent | b8dd7dae42e783f2236f889d276e66bedb182837 (diff) |
truncate files when writing
Diffstat (limited to 'apply.go')
-rw-r--r-- | apply.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -42,7 +42,7 @@ func applyFile(name string) error { if err = os.MkdirAll(filepath.Dir(d), 0700); err != nil { return err } - out, err := os.OpenFile(d, os.O_CREATE|os.O_WRONLY, 0600) + out, err := os.OpenFile(d, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) if err != nil { return err } |