Details
Description
QFile on Android unable to open file content:// with space in the name
In order to open file need to replace spaces to "%20".
Workaround:
#ifdef Q_OS_ANDROID // patch for files containing spaces etc const QString sep {"raw%3A%2F"}; if (fileName.startsWith("content://") && fileName.contains(sep)) { QString contentUrl = fileName.split(sep).at(0); QString rawUrl = fileName.split(sep).at(1); rawUrl.replace(" ", "%20"); fileName = contentUrl + sep + rawUrl; } #endif
Attachments
Issue Links
- duplicates
-
QTBUG-112738 QDir::entryInfoList() broken on Android when nameFilters used
- Closed