summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-12-16 19:22:37 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-12-16 19:22:37 (GMT)
commit0048c98fef96fa5df30db535bc124ee9aac341b0 (patch)
tree70c4cd0630369a5aef472813c185fa8e8466ae47 /Lib/pathlib.py
parentc274fd22edd2471b4f73f5cc690851cfbc716589 (diff)
downloadcpython-0048c98fef96fa5df30db535bc124ee9aac341b0.zip
cpython-0048c98fef96fa5df30db535bc124ee9aac341b0.tar.gz
cpython-0048c98fef96fa5df30db535bc124ee9aac341b0.tar.bz2
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.
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 9b4fde1..18facd9 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -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):