|
@@ -257,21 +257,21 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
|
}
|
|
}
|
|
|
|
|
|
initTargetFolder();
|
|
initTargetFolder();
|
|
|
|
+ browseToFolderIfItExists();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void browseToFolderIfItExists() {
|
|
String full_path = generatePath(mParents);
|
|
String full_path = generatePath(mParents);
|
|
final OCFile fileByPath = getStorageManager().getFileByPath(full_path);
|
|
final OCFile fileByPath = getStorageManager().getFileByPath(full_path);
|
|
if (fileByPath != null) {
|
|
if (fileByPath != null) {
|
|
startSyncFolderOperation(fileByPath);
|
|
startSyncFolderOperation(fileByPath);
|
|
populateDirectoryList();
|
|
populateDirectoryList();
|
|
} else {
|
|
} else {
|
|
- handleNonExistingFolder();
|
|
|
|
|
|
+ browseToRoot();
|
|
|
|
+ preferences.setLastUploadPath(OCFile.ROOT_PATH);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void handleNonExistingFolder() {
|
|
|
|
- browseToRoot();
|
|
|
|
- preferences.setLastUploadPath(OCFile.ROOT_PATH);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
|
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
|
Log_OC.d(TAG, "onSaveInstanceState() start");
|
|
Log_OC.d(TAG, "onSaveInstanceState() start");
|
|
@@ -634,14 +634,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
|
super.onBackPressed();
|
|
super.onBackPressed();
|
|
} else {
|
|
} else {
|
|
mParents.pop();
|
|
mParents.pop();
|
|
- String full_path = generatePath(mParents);
|
|
|
|
- final OCFile fileByPath = getStorageManager().getFileByPath(full_path);
|
|
|
|
- if (fileByPath != null) {
|
|
|
|
- startSyncFolderOperation(fileByPath);
|
|
|
|
- populateDirectoryList();
|
|
|
|
- } else {
|
|
|
|
- handleNonExistingFolder();
|
|
|
|
- }
|
|
|
|
|
|
+ browseToFolderIfItExists();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|