Fix Path -> Uri conversion
No need to do it for '?' as that's not allowed in filename.
This commit is contained in:
1 parent
67ddba87b5
commit
ab2e4a8e2d
1 file changed
+1
-1
@@ -37,7 +37,7 @@ fun Path.toUri(): Uri {
|
||||
return toFile().toUri()
|
||||
}
|
||||
|
||||
val uri = str.replaceFirst("content:/", "content://").toUri()
|
||||
val uri = str.replaceFirst("content:/", "content://").replace("#", "%23").toUri()
|
||||
val paths = uri.pathSegments
|
||||
return if (paths.size > 3 && paths[0] == "tree") {
|
||||
uri.buildUpon().apply {
|
||||
|
||||
Reference in new issue
Block a user