From d9a2dd8d3b55d16d2e38d124abb0ade490963b37 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Jan 2017 12:17:12 -0800 Subject: 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 Reviewed-by: David Faure --- tests/auto/corelib/io/qdir/tst_qdir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') 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; -- cgit v1.2.3