[issue19930] os.makedirs('dir1/dir2', 0) always fails

Serhiy Storchaka report at bugs.python.org
Fri Jun 10 03:29:59 EDT 2016


Serhiy Storchaka added the comment:

> The obvious but more complicated alternative would be to call chmod() on all the new directories in a second step.

This is dangerous, because if you create read-only or unlistable directory, you couldn't remove it without changing the permission of parent directory. shutil.rmtree() would fail.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19930>
_______________________________________


More information about the Python-bugs-list mailing list