Skip to content

Commit

Permalink
Add safety condition to retrieve the current account in case the acco…
Browse files Browse the repository at this point in the history
…unt in FolderPickerActivity is null (shouldn't happen in normal situations)
  • Loading branch information
JuancaG05 committed Feb 21, 2024
1 parent b5ce8b5 commit 3097905
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ open class FolderPickerActivity : FileActivity(),

private fun initAndShowListOfFilesFragment(spaceId: String? = null) {
val safeInitialFolder = if (file == null) {
if (account == null) {
account = AccountUtils.getCurrentOwnCloudAccount(applicationContext)
}
val fileDataStorageManager = FileDataStorageManager(account)
fileDataStorageManager.getFileByPath(OCFile.ROOT_PATH, spaceId)
} else {
Expand Down

0 comments on commit 3097905

Please sign in to comment.