Skip to content
Permalink
Browse files

Change backup path to fit win

  • Loading branch information...
Raggaer committed Feb 27, 2019
1 parent 3c1dd5f commit 38e7a3cd843bc7c2cd24405cb9fa030862953382
Showing with 3 additions and 2 deletions.
  1. +3 −2 save.go
@@ -49,7 +49,8 @@ func saveDatabase() error {
if err := encoder.Encode(database); err != nil {
return err
}
return openDatabaseFile(databaseLocation)
database.UnlockProtectedEntries()
return nil
}

func backupDatabase() error {
@@ -59,7 +60,7 @@ func backupDatabase() error {
}
defer src.Close()
dir, file := filepath.Split(databaseLocation)
backupName := filepath.Join(dir, time.Now().Format("2006-01-02_15:04:05")+"_"+file)
backupName := filepath.Join(dir, time.Now().Format("2006-01-02_15-04-05")+"_"+file)
dst, err := os.Create(backupName)
if err != nil {
return err

0 comments on commit 38e7a3c

Please sign in to comment.
You can’t perform that action at this time.