diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-01-24 12:17:12 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-03-20 21:54:43 +0000 |
commit | 9b3530a3aeda8ea5462922f2b53c771ca722d4cd (patch) | |
tree | 6c1d349f0f9df473162fd89568a55034fc1007a7 /tests | |
parent | 1cf75af3f2f3430bab11f9ef1eea5deb4c59aa2e (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>
(cherry picked from commit d9a2dd8d3b55d16d2e38d124abb0ade490963b37)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qdir/tst_qdir.cpp | 2 |
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 90c5a4d907..abef4c8b9e 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -355,7 +355,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; |