Merge pull request #51 from jkaninda/develop

refactor: refactoring of code
This commit is contained in:
2024-02-20 07:58:08 +01:00
committed by GitHub

View File

@@ -141,13 +141,12 @@ func BackupDatabase(disableCompression bool, prune bool, keepLast int) {
log.Fatal(err)
}
utils.Done("Database has been backed up")
}
//Delete old backup
if prune {
deleteOldBackup(keepLast)
}
}
historyFile, err := os.OpenFile(fmt.Sprintf("%s/history.txt", storagePath), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
log.Fatal(err)