New submission from Carl Andersson <carl.a...@icloud.com>:

os.makedirs does not handle the empty string the same way as the os.path.XX 
functions does. This is (to me) unexpected behaviour, since calls like 
`os.makedirs(os.path.dirname(filename), exist_ok=True)` raises an exception if 
`filename` does not contain any directories.
Also, it raises an `FileNotFoundError` regardless of the `exist_ok` flag. I 
would expect `os.makedirs('')` to fail with `FileExistsError` and 
`os.makedirs('', exist_ok=True)` to not do anything.

----------
components: Library (Lib)
messages: 320486
nosy: CarlAndersson
priority: normal
severity: normal
status: open
title: os.makedirs and empty string
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to