Android: fix handling of tree content uri with sub-document
Check for the index of last '/' from the non-encoded path. Amends ea75e34d6968bb59624874411e793c95b26d0dbe. Change-Id: I3ef5d454a46c711a85fe7ef01ea9d3d93a2d574f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 4721721f6005c90cb1760b0c6e074468aa73512f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
208a587b01
commit
d05102e1da
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user