mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-19930: The mode argument of os.makedirs() no longer affects the file (#799)
permission bits of newly-created intermediate-level directories.
This commit is contained in:
parent
5619ab2db3
commit
e304e33c16
5 changed files with 32 additions and 3 deletions
|
@ -207,7 +207,7 @@ def makedirs(name, mode=0o777, exist_ok=False):
|
|||
head, tail = path.split(head)
|
||||
if head and tail and not path.exists(head):
|
||||
try:
|
||||
makedirs(head, mode, exist_ok)
|
||||
makedirs(head, exist_ok=exist_ok)
|
||||
except FileExistsError:
|
||||
# Defeats race condition when another thread created the path
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue