summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-04-16 09:34:50 +0200
committerLiang Qi <liang.qi@qt.io>2019-04-16 09:34:50 +0200
commit9d67bf6e9635505bd9523a3007f8e531f890c88f (patch)
treea4b8a21313b4ac66bb1e96d90504a001863e2f22 /tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
parent12b96dbb81a1a7bc5ffc08c24942038b007985e9 (diff)
parent5b3dfa470ed7ea40103daa785286ab71fb7aa230 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/corelib/tools/qlocale.qdoc tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 714c96b5e5..a92b4bd1cb 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1559,6 +1559,16 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
<< NtfsTestResource(NtfsTestResource::SymLink, relToRelSymlink, relToRelTarget)
<< relToRelSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
}
+ {
+ // Symlink to UNC share
+ pwd.mkdir("unc");
+ QString errorMessage;
+ QString uncTarget = QStringLiteral("//") + QtNetworkSettings::winServerName() + "/testshare";
+ QString uncSymlink = QDir::toNativeSeparators(pwd.absolutePath().append("\\unc\\link_to_unc"));
+ QTest::newRow("UNC symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, uncSymlink, uncTarget)
+ << QDir::fromNativeSeparators(uncSymlink) << true << QDir::fromNativeSeparators(uncTarget) << uncTarget;
+ }
//Junctions
QString target = "target";
@@ -1630,7 +1640,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks()
// Ensure that junctions, mountpoints are removed. If this fails, do not remove
// temporary directory to prevent it from trashing the system.
if (fi.isDir()) {
- if (!QDir().rmdir(fi.fileName())) {
+ if (!QDir().rmdir(fi.filePath())) {
qWarning("Unable to remove NTFS junction '%s'', keeping '%s'.",
qPrintable(fi.fileName()), qPrintable(QDir::toNativeSeparators(m_dir.path())));
m_dir.setAutoRemove(false);