Save storage unconditionally on location set
The storage plugin cannot find USB backups for secondary users if it is not saved before checking if backups exist
This commit is contained in:
parent
dd57828697
commit
d7910a84b4
1 changed files with 1 additions and 1 deletions
|
@ -24,6 +24,7 @@ internal class RestoreStorageViewModel(
|
|||
|
||||
override fun onLocationSet(uri: Uri) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
saveStorage(uri)
|
||||
val hasBackup = try {
|
||||
storagePlugin.hasBackup(uri)
|
||||
} catch (e: IOException) {
|
||||
|
@ -31,7 +32,6 @@ internal class RestoreStorageViewModel(
|
|||
false
|
||||
}
|
||||
if (hasBackup) {
|
||||
saveStorage(uri)
|
||||
mLocationChecked.postEvent(LocationResult())
|
||||
} else {
|
||||
Log.w(TAG, "Location was rejected: $uri")
|
||||
|
|
Loading…
Reference in a new issue