Fix AndroidAbstractFileEngine

"" it's the root folder of the assets, setting m_fileName = "" will make
AndroidAbstractFileEngine::setFileName to fail and it will not set the
proper flags.

Fixes: QTBUG-81535
Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
bb10
BogDan Vatra 2020-01-20 16:47:16 +02:00
parent 9ecc595d71
commit 0947cf66e5
1 changed files with 4 additions and 1 deletions

View File

@ -110,6 +110,8 @@ public:
static AssetItem::Type fileType(const QString &filePath)
{
if (filePath.isEmpty())
return AssetItem::Type::Folder;
const QStringList paths = filePath.split(QLatin1Char('/'));
QString fullPath;
AssetItem::Type res = AssetItem::Type::Invalid;
@ -399,7 +401,8 @@ public:
private:
AAsset *m_assetFile = nullptr;
AAssetManager *m_assetManager = nullptr;
QString m_fileName;
// initialize with a name that can't be used as a file name
QString m_fileName = QLatin1String(".");
bool m_isFolder = false;
};