Eryk Sun added the comment:
This case is similar to issue 29079. It should only attempt to make the parent
to handle ENOENT if self and self.parent aren't equal. Here's the snippet from
Path.mkdir:
try:
self._accessor.mkdir(self, mode)
except FileExistsError:
if not exist_ok or not self.is_dir():
raise
except OSError as e:
if e.errno != ENOENT:
raise
self.parent.mkdir(parents=True)
self._accessor.mkdir(self, mode)
----------
nosy: +eryksun
stage: -> needs patch
versions: +Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29416>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com