[issue29694] race condition in pathlib mkdir with flags parents=True

whitespacer report at bugs.python.org
Thu Mar 2 08:53:33 EST 2017


New submission from whitespacer:

When pathlib mkdir is called with parents=True and some parent doesn't exists it recursively calls self.parent.mkdir(parents=True) after catching OSError. However after catching of OSError and before call to self.parent.mkdir(parents=True) somebody else can create parent dir, which will lead to FileExistsError exception.

----------
messages: 288801
nosy: whitespacer
priority: normal
severity: normal
status: open
title: race condition in pathlib mkdir with flags parents=True
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29694>
_______________________________________


More information about the Python-bugs-list mailing list