Issue #19921: When Path.mkdir() is called with parents=True, any missing parent is created with the default permissions, ignoring the mode argument (mimicking the POSIX "mkdir -p" command).

Patch by Serhiy.
This commit is contained in:
Antoine Pitrou 2013-12-16 20:22:37 +01:00
parent c274fd22ed
commit 0048c98fef
4 changed files with 20 additions and 4 deletions

View file

@ -1101,7 +1101,7 @@ class Path(PurePath):
except OSError as e:
if e.errno != ENOENT:
raise
self.parent.mkdir(mode, True)
self.parent.mkdir(parents=True)
self._accessor.mkdir(self, mode)
def chmod(self, mode):