From 97a8dff3c07b0aa14d1f89f4364183982f52c58a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 18 Jan 2012 14:50:23 +0100 Subject: remove NTFS junction and mount point detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt now treats neither NTFS junctions nor mount points as symlinks. Task-number: QTBUG-20431 Change-Id: I93f67d7438d441ceb53308d4a1f29335beedd547 Reviewed-by: João Abecasis --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 5764cee66d..7ca41d3bf3 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1362,7 +1362,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()); @@ -1375,7 +1375,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); @@ -1390,7 +1390,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(); } } @@ -1403,8 +1403,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() -- cgit v1.2.3