Files
tubestation/browser/components/backup/tests
Mike Conley 69fe481887 Bug 1890427 - Part 11: Avoid regenerating when scheduled backups disabled, and deleting non-existant backup destination folder. r=backup-reviewers,kpatenio
We don't want to regenerate a backup if scheduled backups are disabled, so
we now do a check inside of the DeferredTask for the scheduling pref before
attempting a regeneration.

The prior patches in this stack cause us to attempt to delete any known
backups when doing certain clearing operations. If a backup destination
folder was not configured or is pointing at a non-existant directory,
this can cause us to throw. This is non-fatal but annoying.

This patch is some belt-and-suspenders which changes the behaviour so that:

1. Deletion is not attempted if scheduled backups are not enabled.
2. The backup destination pref is checked for non-empty values before
   attempting to check its existence.
3. The existence check is wrapped in a try/catch in the event that
   the destination pref is set to an invalid path for the OS.

Differential Revision: https://phabricator.services.mozilla.com/D221478
2024-09-18 13:32:12 +00:00
..