qt5base-lts/tests/auto/corelib/io
Shawn Rutledge 3e2cd8ef6f fix QFileSystemEngine::createDirectory race condition
During a call to QDir::mkpath(), the same path could be created
by another process, in which case the OS mkdir will fail with EEXIST.
But the docs for mkpath() state that it's not an error if it
already exists, whereas for mkdir() it is an error.  So
QFileSystemEngine::createDirectory should accept the EEXIST error
silently if it occurs while creating the sequence of parent directories
and the final leaf directory, but should fail if EEXIST happens when
it was called from QDir::mkdir(), which is when the createParents
parameter is false.  We assume the operating system mkdir() and
CreateDirectory() are atomic, so there should be no race condition
in QDir::mkdir().  It's not necessary for mkpath() to call stat()
at each level, only to check whether an existing entry is a directory
or a file.  Also added to the autotest to verify that if the
path is an existing file, creating a dir with the same name will
fail in either mkdir or mkpath.

Task-number: QTBUG-30046
Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-14 16:57:57 +02:00
..
largefile Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qabstractfileengine Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qbuffer Make QBuffer::bytesAvailable() work 2013-04-16 19:45:11 +02:00
qdatastream Revert QDateTime serialisation to pre-Qt 5 behaviour. 2013-05-08 10:00:29 +02:00
qdataurl tst_qdataurl: Remove QT_DISABLE_DEPRECATED_BEFORE=0 2013-04-12 07:19:45 +02:00
qdebug Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
qdir fix QFileSystemEngine::createDirectory race condition 2013-06-14 16:57:57 +02:00
qdiriterator Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qfile Fix tst_qfile build for WEC7. 2013-04-17 19:48:32 +02:00
qfileinfo tst_qfileinfo: Fix invalid preprocessor directive. 2013-02-26 19:24:36 +01:00
qfilesystementry Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qfilesystemwatcher Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qiodevice Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qipaddress Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qlockfile tst_qlockfile: increase delay on Windows. 2013-03-19 06:29:13 +01:00
qnodebug Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qprocess QProcess/Win: drain output pipes on process finish 2013-05-07 15:02:34 +02:00
qprocess-noapplication Re-revert "Delay creation of the process manager" 2012-10-15 04:52:08 +02:00
qprocessenvironment Check existence of QProcess feature before using it on Qt autotests. 2013-01-28 16:06:15 +01:00
qresourceengine Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
qsavefile QSaveFile: allow saving to a writable file in a non-writable directory 2013-04-05 11:04:35 +02:00
qsettings Fix QSettings autotest for VxWorks 2013-02-19 10:35:06 +01:00
qstandardpaths QStandardPaths: Use forward slash consistently. 2013-02-27 09:24:33 +01:00
qtemporarydir Let QTemporaryDir::stressTest() run in temporary directory. 2013-06-12 14:12:05 +02:00
qtemporaryfile Ensure QTemporaryFile can create files when an identical dir exists. 2013-03-23 14:42:45 +01:00
qtextstream Check existence of QProcess feature before using it on Qt autotests. 2013-01-28 16:06:15 +01:00
qurl QUrl: update top level domains that may contain non-ASCII characters 2013-03-02 10:13:27 +01:00
qurlinternal QUrl: update top level domains that may contain non-ASCII characters 2013-03-02 10:13:27 +01:00
qurlquery tests: Fix some more old references and links to Nokia 2013-02-01 15:27:37 +01:00
qwinoverlappedionotifier Fix MinGW-Warnings in tst_qwinoverlappedionotifier. 2013-01-28 16:19:21 +01:00
io.pro Long live QLockFile 2013-03-05 06:26:33 +01:00