Go to file
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
bin don't process ANGLE and zlib headers like real qt modules 2013-06-10 21:12:05 +02:00
config.tests Add xcb-xkb to 3rd party libs 2013-05-07 22:43:14 +02:00
dist Revert QDateTime serialisation to pre-Qt 5 behaviour. 2013-05-08 10:00:29 +02:00
doc Update Urls to CMake docs. 2013-05-20 12:06:48 +02:00
examples docs: DirView example uses QFileSystemModel not QDirModel 2013-05-31 17:46:08 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs remove overquoting of extra compiler arguments 2013-06-12 10:10:50 +02:00
qmake run syncqt only for builds from git 2013-06-03 17:59:47 +02:00
src fix QFileSystemEngine::createDirectory race condition 2013-06-14 16:57:57 +02:00
tests fix QFileSystemEngine::createDirectory race condition 2013-06-14 16:57:57 +02:00
tools don't claim that we need perl for shadow builds any more 2013-06-12 10:10:41 +02:00
util Don't show a separate inspector for child windows. 2013-04-23 07:45:22 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QLockFile 2013-03-05 06:26:33 +01:00
.qmake.conf require modules to define their version 2013-03-06 18:01:13 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure remove pointless symlink fallback for qconfig.h 2013-06-05 12:36:58 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro always create qt_tool_syncqt.pri when shadow-building 2013-05-15 05:06:15 +02:00
sync.profile put ANGLE includes in a QtANGLE subdir 2013-06-10 21:12:13 +02:00