summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-01-18 14:50:23 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-19 11:31:22 +0100
commit97a8dff3c07b0aa14d1f89f4364183982f52c58a (patch)
treef69ee6af5c320f2dc735e0f05dd4ec2c612f1226
parent49d1b068987d0895b2429b3d87beb561d9fbcbd7 (diff)
remove NTFS junction and mount point detection
Qt now treats neither NTFS junctions nor mount points as symlinks. Task-number: QTBUG-20431 Change-Id: I93f67d7438d441ceb53308d4a1f29335beedd547 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp12
1 files changed, 7 insertions, 5 deletions
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()