Closed grote closed 1 month ago
- try to retrieve actual free space from backup location and warn the user before attempting a backup if this is very low. some hacks are used to get the free space from external storage SAF providers
Tested this portion with a flash drive, and it looks like it's working fine. Free space is also shown when selecting a backup location, and backup sizes are shown when restoring.
- catch exceptions that include hints about out of storage situations and then warn the user as soon as such an exception happens. Note that SAF does not always expose those exceptions to the caller.
Tested this by setting MIN_FREE_SPACE to -1 and recompiling. Seems to not notice an IOException for ENOSPC (caused by ErrnoException for ENOSPC) and waits a few minutes until timing out with a generic "Backup failed." Full log provided privately.
Seems to not notice an IOException for ENOSPC
This helped me to identify additional out of space situations,we can now warn the user about. Pushed those as extra commits.
This PR takes two approaches for warning the user about out of space situations:
Related to #363 Fixes #555