diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt index 48ff6e958ea..cb6e68b4b4f 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt @@ -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 {