diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-01-18 14:44:42 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-19 11:31:22 +0100 |
commit | 49d1b068987d0895b2429b3d87beb561d9fbcbd7 (patch) | |
tree | 892e662e6b22cb3c1c1632f981c91b04b2a826ed /src/corelib/io/qfilesystemmetadata_p.h | |
parent | 911fd9491396c837d0a21451aede2adb3e707209 (diff) |
Revert "fix NTFS mount points"
We agreed on treating neither junctions nor mount points as symlinks.
This will be handled in another commit.
This reverts commit 1656c4780cc6c1d96f47522046f3f53b1eebb95a.
Change-Id: I41a87b6df9f7fba333df4c967ee9f0c1f3940952
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/corelib/io/qfilesystemmetadata_p.h')
-rw-r--r-- | src/corelib/io/qfilesystemmetadata_p.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h index 9895c22440..6ed5cec954 100644 --- a/src/corelib/io/qfilesystemmetadata_p.h +++ b/src/corelib/io/qfilesystemmetadata_p.h @@ -234,7 +234,7 @@ public: #if defined(Q_OS_WIN) inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false); - inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false, const QString &nativeFullFilePath = QString()); + inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false); inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo); #endif private: @@ -350,7 +350,7 @@ inline void QFileSystemMetaData::fillFromFileAttribute(DWORD fileAttribute,bool knownFlagsMask |= FileType | DirectoryType | HiddenAttribute | ExistsAttribute; } -inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot, const QString &nativeFullFilePath) +inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot) { fillFromFileAttribute(findData.dwFileAttributes, isDriveRoot); creationTime_ = findData.ftCreationTime; @@ -368,23 +368,12 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo knownFlagsMask |= LinkType; entryFlags &= ~LinkType; #if !defined(Q_OS_WINCE) - if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { - if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) { - entryFlags |= LinkType; - } else if (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) { - // Junctions and mount points are implemented as NTFS reparse points. - // But mount points cannot be treated as symlinks because they might - // not have a link target. - wchar_t buf[50]; - QString path = nativeFullFilePath; - if (!path.endsWith(QLatin1Char('\\'))) - path.append(QLatin1Char('\\')); - BOOL isMountPoint = GetVolumeNameForVolumeMountPoint(reinterpret_cast<const wchar_t*>(path.utf16()), buf, sizeof(buf) / sizeof(wchar_t)); - if (!isMountPoint) - entryFlags |= LinkType; - } + if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) + && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { + entryFlags |= LinkType; } #endif + } } |