summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/db.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/db.go b/db/db.go
index 4ee511b..05baf07 100644
--- a/db/db.go
+++ b/db/db.go
@@ -102,7 +102,7 @@ func (fdb *FernDB) Write() error {
return fmt.Errorf("FernDB path not set")
}
- f, err := os.OpenFile(dbPath, os.O_WRONLY|os.O_CREATE, 0644)
+ f, err := os.OpenFile(dbPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
return err
}