Skip to content

Commit

Permalink
delete archive even if the archive id is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rainu committed Jan 7, 2021
1 parent c5bc70d commit adef001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion backup/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit adef001

Please sign in to comment.