Fix not found dialog during unlock if it contains a blank using OneDrive
"Vault not found" dialog is displayed during unlocking if it contains a blank character due to encoding twice. MicrosoftGraph now encodes the provided path to `itemWithPath` itself. Fixes #419
This commit is contained in:
parent
d0a3a05afb
commit
8f69701b82
@ -1,7 +1,6 @@
|
||||
package org.cryptomator.data.cloud.onedrive
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import com.microsoft.graph.http.GraphServiceException
|
||||
import com.microsoft.graph.models.DriveItem
|
||||
import com.microsoft.graph.models.DriveItemCreateUploadSessionParameterSet
|
||||
@ -86,7 +85,7 @@ internal class OnedriveImpl(cloud: OnedriveCloud, context: Context, graphService
|
||||
|
||||
private fun childByName(parentId: String, parentDriveId: String, name: String): DriveItem? {
|
||||
return try {
|
||||
drive(parentDriveId).items(parentId).itemWithPath(Uri.encode(name)).buildRequest().get()
|
||||
drive(parentDriveId).items(parentId).itemWithPath(name).buildRequest().get()
|
||||
} catch (e: GraphServiceException) {
|
||||
if (isNotFoundError(e)) {
|
||||
null
|
||||
|
Loading…
x
Reference in New Issue
Block a user