diff options
-rw-r--r-- | adopt.go | 2 | ||||
-rw-r--r-- | apply.go | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -30,7 +30,7 @@ func adoptFile(name string) error { return err } defer from.Close() - to, err := os.OpenFile(toPath, os.O_CREATE|os.O_WRONLY, 0600) + to, err := os.OpenFile(toPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) if err != nil { return err } @@ -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 } |