qt5base-lts/tests/auto/corelib
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
..
animation Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
codecs Fix regression when pasting into QTextEdit from Firefox. 2013-05-23 16:55:30 +02:00
global Make QFlags enum flags (C++11 strict enums) friendly 2013-05-09 12:17:59 +02:00
io fix QFileSystemEngine::createDirectory race condition 2013-06-14 16:57:57 +02:00
itemmodels Fix QAbstractItemModel::moveColumn() 2013-04-23 13:35:31 +02:00
json Fix parsing of long latin strings in the json parser 2013-05-23 22:00:46 +02:00
kernel QEventLoop: Remove the test that checked throwing from an event handler 2013-06-08 23:00:50 +02:00
mimetypes QMimeDatabase: pass MatchMode down, to fix MatchContent. 2013-03-01 13:05:11 +01:00
plugin Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
statemachine Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
thread QThreadPool: Fix regression from Qt 4 in dealing with priority starts 2013-05-20 12:06:48 +02:00
tools Revert QDateTime serialisation to pre-Qt 5 behaviour. 2013-05-08 10:00:29 +02:00
xml Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00