mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 04:51:38 +02:00
UserPreference: Fix changes from 9787489bc5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
812b92ab38
commit
af9f8f529b
|
@ -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