Use strlen to determine length of returned path
Change-Id: I8603f032bacdbb060be043f8720bd2b8c34d7ec6 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
aac68052af
commit
0147ee75dd
@ -97,7 +97,7 @@ static QString getFullPath(const FSRef &ref)
|
||||
{
|
||||
QByteArray ba(2048, 0);
|
||||
if (FSRefMakePath(&ref, reinterpret_cast<UInt8 *>(ba.data()), ba.size()) == noErr)
|
||||
return QString::fromUtf8(ba).normalized(QString::NormalizationForm_C);
|
||||
return QString::fromUtf8(ba.constData()).normalized(QString::NormalizationForm_C);
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user