summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-01-24 12:17:12 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-02-16 21:08:32 +0000
commitd9a2dd8d3b55d16d2e38d124abb0ade490963b37 (patch)
tree176b5146049076c892ab401b9bc61b330ced1933 /tests/auto
parentde225ccdf95efb57866d62bc80872c1a2ab99703 (diff)
QDir::mkpath: don't try to mkdir in automount filesystems
Automount filesystems like /home on many operating systems (QNX and OpenIndiana, at least) don't like if you try to mkdir in them, even if the file path already exists. OpenIndiana even gives you an ENOSYS error. So instead, let's try to mkdir our target, if we fail because of ENOENT, we try to create the parent, then try again. Task-number: QTBUG-58390 Change-Id: Ibe5b1b60c6ea47e19612fffd149cce81589b0acd Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index b86c6e4dfa..c3774997e9 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -350,7 +350,7 @@ void tst_QDir::mkdir_data()
<< QDir::currentPath() + "/testdir/two/three";
QTest::newRow("data0") << dirs.at(0) << true;
QTest::newRow("data1") << dirs.at(1) << false;
- QTest::newRow("data2") << dirs.at(2) << false;
+ QTest::newRow("data2") << dirs.at(2) << false; // note: requires data1 to have been run!
// Ensure that none of these directories already exist
QDir dir;