From adef0012e896adb9a13e7ffc8feffe5426a39440 Mon Sep 17 00:00:00 2001 From: rainu Date: Thu, 7 Jan 2021 20:07:09 +0100 Subject: [PATCH] delete archive even if the archive id is empty --- README.md | 2 ++ backup/manager.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e671c81..ba62c21 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ go build ## Release History +* 0.2.4 + * delete the archive even if the archive id is empty * 0.2.3 * ask for the password if no one is in the database and no corresponding argument is giving * 0.2.2 diff --git a/backup/manager.go b/backup/manager.go index 44cbc28..77bc812 100644 --- a/backup/manager.go +++ b/backup/manager.go @@ -288,7 +288,8 @@ func (b *backupManager) ensureTarget(target string) error { func (b *backupManager) Delete(backupId uint) error { toDelete := b.dbRepository.GetBackupById(backupId) if toDelete.ArchiveId == nil { - return errors.New("The backup has no archiveId. Was the upload successful?") + b.dbRepository.DeleteBackupById(backupId) + return nil } err := b.glacier.Delete(AWSGlacierDelete{