mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
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:
parent
c274fd22ed
commit
0048c98fef
4 changed files with 20 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue