mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Soften requirement on cleanup step failures
This commit is contained in:
parent
6722f71be8
commit
8ad388f951
1 changed files with 2 additions and 10 deletions
|
@ -106,10 +106,6 @@ public class StorageMigrationActivity extends AppCompatActivity {
|
|||
int getResId() { return mResId; }
|
||||
}
|
||||
|
||||
private class MigrationCleanupException extends Exception {
|
||||
MigrationCleanupException() {}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Integer doInBackground(String... args) {
|
||||
|
||||
|
@ -152,10 +148,6 @@ public class StorageMigrationActivity extends AppCompatActivity {
|
|||
rollback();
|
||||
Log_OC.startLogging(mStorageSource);
|
||||
return e.getResId();
|
||||
} catch (MigrationCleanupException e) {
|
||||
Log_OC.w(TAG, "Migration cleanup step failed");
|
||||
Log_OC.startLogging(mStorageSource);
|
||||
return 0;
|
||||
} finally {
|
||||
publishProgress(mProgress++, R.string.file_migration_restoring_accounts_configuration);
|
||||
restoreAccountsSyncStatus(ocAuthority, ocAccounts, oldAutoSync);
|
||||
|
@ -246,10 +238,10 @@ public class StorageMigrationActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
void cleanup() throws MigrationCleanupException {
|
||||
void cleanup() {
|
||||
File srcFile = new File(mStorageSource + File.separator + MainApp.getDataFolder());
|
||||
if (!srcFile.delete())
|
||||
throw new MigrationCleanupException();
|
||||
Log_OC.w(TAG, "Migration cleanup step failed");
|
||||
}
|
||||
|
||||
void rollback() {
|
||||
|
|
Loading…
Reference in a new issue