If we fail to persist the current settings and fall back to the back settings file
when reading settings in PackageManager, we might rename the corrupted settings to
backup(in case of power failure between the earlier write failure and file deletion)
and end up loosing both files.
So just clear up the corrupted current settings file if we have backup.
The backup wouldn't exist if everything went well with persisting the earlier settings.

We do this in both read and write just in case.
1 file changed