diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-01-17 14:21:05 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-17 19:24:29 +0100 |
commit | 1656c4780cc6c1d96f47522046f3f53b1eebb95a (patch) | |
tree | 6c03ae88c25fed881871244f84b7735df20a1c7a /src/corelib/io/qfilesystemengine_win.cpp | |
parent | b41fd5cf1225c54bbd33089230487e42bf94f127 (diff) |
fix NTFS mount points
NTFS mount points are not treated as symlinks, because they might
not have a link target.
This is the case when a volume is mounted as a single mount point
without a drive letter.
This patch fixes building Qt in an NTFS mount point.
Task-number: QTBUG-20431
Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'src/corelib/io/qfilesystemengine_win.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index d724429f6b..4d56739483 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -792,9 +792,10 @@ static bool tryFindFallback(const QFileSystemEntry &fname, QFileSystemMetaData & int errorCode = GetLastError(); if (errorCode == ERROR_ACCESS_DENIED || errorCode == ERROR_SHARING_VIOLATION) { WIN32_FIND_DATA findData; - if (getFindData(fname.nativeFilePath(), findData) + const QString nativeFilePath = fname.nativeFilePath(); + if (getFindData(nativeFilePath, findData) && findData.dwFileAttributes != INVALID_FILE_ATTRIBUTES) { - data.fillFromFindData(findData, true, fname.isDriveRoot()); + data.fillFromFindData(findData, true, fname.isDriveRoot(), nativeFilePath); filledData = true; } } @@ -875,8 +876,9 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM data.knownFlagsMask |= QFileSystemMetaData::LinkType; if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { WIN32_FIND_DATA findData; - if (getFindData(fname.nativeFilePath(), findData)) - data.fillFromFindData(findData, true); + const QString nativeFilePath = fname.nativeFilePath(); + if (getFindData(nativeFilePath, findData)) + data.fillFromFindData(findData, true, false, nativeFilePath); } } data.knownFlagsMask |= what; |