diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-06 11:24:38 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-21 07:49:00 +0000 |
commit | 49d3bb005889b9fb5a06d6aadac23ebd5b2f9f2d (patch) | |
tree | 281ff7de89ec8cad24b173ef46e8c61dc920ab83 /src | |
parent | 557abfc3275f74d3dd537d7bca86e15860d072e9 (diff) |
Normalize realpath(3) output to composed form
All strings coming out of POSIX API calls are converted to composed form
by QFile::decodeName. Do the same for realpath(3) output. This is
especially important for HFS+, which will store file names in decomposed
form, and APIs will therefore return strings in decomposed form.
Task-number: QTBUG-55896
Change-Id: I5e51f4e5712ff26bf9644cbcf9a9603995748892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 7bc2293b0d..3cc27bf847 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -276,7 +276,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, if (ret) { data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; data.entryFlags |= QFileSystemMetaData::ExistsAttribute; - QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret)); + QString canonicalPath = QDir::cleanPath(QFile::decodeName(ret)); free(ret); return QFileSystemEntry(canonicalPath); } else if (errno == ENOENT) { // file doesn't exist |