UserPreference: Fix changes from 9787489bc5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
812b92ab38
commit
af9f8f529b
1 changed files with 2 additions and 1 deletions
|
@ -481,7 +481,8 @@ class UserPreference : AppCompatActivity() {
|
|||
// TODO: This is fragile. Workaround until PasswordItem is backed by DocumentFile
|
||||
val docId = DocumentsContract.getTreeDocumentId(uri)
|
||||
val split = docId.split(":".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
val repoPath = "${Environment.getExternalStorageDirectory()}/${split[1] ?: split[0]}"
|
||||
val path = if (split.size > 0) split[1] else split[0]
|
||||
val repoPath = "${Environment.getExternalStorageDirectory()}/$path"
|
||||
|
||||
Timber.tag(TAG).d("Selected repository path is $repoPath")
|
||||
|
||||
|
|
Loading…
Reference in a new issue