Avoid encoding commonplace characters in tree names
* java/org/gnu/emacs/EmacsService.java (getDocumentTrees): Don't encode some characters that need not be escaped within file names.
This commit is contained in:
parent
1dedd84e42
commit
709195fea6
1 changed files with 6 additions and 2 deletions
|
@ -1294,8 +1294,12 @@ else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
|||
if (DocumentsContract.isTreeUri (uri)
|
||||
&& uri.getAuthority ().equals (providerName)
|
||||
&& permission.isReadPermission ())
|
||||
/* Make sure the tree document ID is encoded. */
|
||||
treeList.add (Uri.encode (DocumentsContract.getTreeDocumentId (uri)));
|
||||
/* Make sure the tree document ID is encoded. Refrain from
|
||||
encoding characters such as +:&?#, since they don't
|
||||
conflict with file name separators or other special
|
||||
characters. */
|
||||
treeList.add (Uri.encode (DocumentsContract.getTreeDocumentId (uri),
|
||||
" +:&?#"));
|
||||
}
|
||||
|
||||
return treeList.toArray (new String[0]);
|
||||
|
|
Loading…
Add table
Reference in a new issue