summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidcontentfileengine.cpp
diff options
context:
space:
mode:
authorAssam Boudjelthia <[email protected]>2023-08-29 10:04:29 +0300
committerAssam Boudjelthia <[email protected]>2023-08-29 16:21:56 +0300
commit4721721f6005c90cb1760b0c6e074468aa73512f (patch)
tree53a0832131f763a001f9bde94af66ba864745a28 /src/plugins/platforms/android/androidcontentfileengine.cpp
parent70869c14592ed99dcf34f582afebb360fd84cdac (diff)
Android: fix handling of tree content uri with sub-document
Check for the index of last '/' from the non-encoded path. Amends ea75e34d6968bb59624874411e793c95b26d0dbe. Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I3ef5d454a46c711a85fe7ef01ea9d3d93a2d574f Reviewed-by: Ville Voutilainen <[email protected]>
Diffstat (limited to 'src/plugins/platforms/android/androidcontentfileengine.cpp')
-rw-r--r--src/plugins/platforms/android/androidcontentfileengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/androidcontentfileengine.cpp b/src/plugins/platforms/android/androidcontentfileengine.cpp
index 4b3355c115e..be8b1a193f7 100644
--- a/src/plugins/platforms/android/androidcontentfileengine.cpp
+++ b/src/plugins/platforms/android/androidcontentfileengine.cpp
@@ -616,7 +616,7 @@ DocumentFilePtr DocumentFile::parseFromAnyUri(const QString &fileName)
const int treeIndex = encodedUri.indexOf(treeType);
const int documentIndex = encodedUri.indexOf(documentType);
- const int index = encodedUri.lastIndexOf(QUrl::toPercentEncoding("/"));
+ const int index = fileName.lastIndexOf("/");
if (index <= treeIndex + treeType.size() || index <= documentIndex + documentType.size())
return fromTreeUri(uri);