diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-01-18 13:08:14 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-18 17:07:00 (GMT) |
commit | ba7a19727c42047048f16f155ce10c51c90fa1bc (patch) | |
tree | 1b088480022092e74d1bfbfce0fb700dbdb85d3a /tests | |
parent | 25960ef75f7dd9bf78fae37177ab2cdbd825af9b (diff) | |
download | Qt-ba7a19727c42047048f16f155ce10c51c90fa1bc.zip Qt-ba7a19727c42047048f16f155ce10c51c90fa1bc.tar.gz Qt-ba7a19727c42047048f16f155ce10c51c90fa1bc.tar.bz2 |
remove NTFS junction and mount point detection
Qt now treats neither NTFS junctions nor mount points as symlinks.
Task-number: QTBUG-20431
Change-Id: Id9bd17f8b93afe9aeb307358ddad5726913961f3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index a8a510a..5cd72cb 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -1435,7 +1435,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data() QString junction = "junction_pwd"; FileSystem::createNtfsJunction(target, junction); QFileInfo targetInfo(target); - QTest::newRow("junction_pwd") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath(); + QTest::newRow("junction_pwd") << junction << false << QString() << QString(); QFileInfo fileInJunction(targetInfo.absoluteFilePath().append("/file")); QFile file(fileInJunction.absoluteFilePath()); @@ -1448,7 +1448,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data() junction = "junction_root"; FileSystem::createNtfsJunction(target, junction); targetInfo.setFile(target); - QTest::newRow("junction_root") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath(); + QTest::newRow("junction_root") << junction << false << QString() << QString(); //Mountpoint typedef BOOLEAN (WINAPI *PtrGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD); @@ -1463,7 +1463,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data() junction = "mountpoint"; rootVolume.replace("\\\\?\\","\\??\\"); FileSystem::createNtfsJunction(rootVolume, junction); - QTest::newRow("mountpoint") << junction << true << QDir::fromNativeSeparators(rootPath) << QDir::rootPath(); + QTest::newRow("mountpoint") << junction << false << QString() << QString(); } } @@ -1476,8 +1476,10 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks() QFileInfo fi(path); QCOMPARE(fi.isSymLink(), isSymLink); - QCOMPARE(fi.symLinkTarget(), linkTarget); - QCOMPARE(fi.canonicalFilePath(), canonicalFilePath); + if (isSymLink) { + QCOMPARE(fi.symLinkTarget(), linkTarget); + QCOMPARE(fi.canonicalFilePath(), canonicalFilePath); + } } void tst_QFileInfo::brokenShortcut() |