diff --git a/owncloudDomain/src/main/java/com/owncloud/android/domain/files/usecases/ManageDeepLinkUseCase.kt b/owncloudDomain/src/main/java/com/owncloud/android/domain/files/usecases/ManageDeepLinkUseCase.kt index fd3cb35102b..802fb5f9756 100644 --- a/owncloudDomain/src/main/java/com/owncloud/android/domain/files/usecases/ManageDeepLinkUseCase.kt +++ b/owncloudDomain/src/main/java/com/owncloud/android/domain/files/usecases/ManageDeepLinkUseCase.kt @@ -28,7 +28,8 @@ import java.net.URI class ManageDeepLinkUseCase : BaseUseCaseWithResult() { override fun run(params: Params): OCFile? { - val pathParts = params.uri.fragment.split(PATH_SEPARATOR) + val path = params.uri.fragment ?: params.uri.path + val pathParts = path.split(PATH_SEPARATOR) if (pathParts[pathParts.size - 2] != DEEP_LINK_PREVIOUS_PATH_SEGMENT) { throw DeepLinkException() }