This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.makedirs returns EACCES for "C:\"
Type: behavior Stage:
Components: Windows Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, luke-jr
Priority: normal Keywords:

Created on 2009-07-21 17:03 by luke-jr, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg90764 - (view) Author: Luke-Jr (luke-jr) Date: 2009-07-21 17:03
Should return EEXIST or EISDIR provided C:\ actually exists
msg90775 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-21 21:37
EACCESS is the error code returned by the underlying mkdir system call.
os.mkdir won't change this, as long as an OSError is raised.

You should use another way to check that the directory exists, like 
os.path.isdir("c:\\")
msg90779 - (view) Author: Luke-Jr (luke-jr) Date: 2009-07-21 23:08
At least fix the documentation, then...
msg90785 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-22 00:13
The documentation carefully don't specify the possible values of errno of 
the exceptions. What do you want to fix?
History
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50783
2009-07-22 00:13:11amaury.forgeotdarcsetmessages: + msg90785
2009-07-21 23:08:51luke-jrsetmessages: + msg90779
2009-07-21 21:37:42amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg90775

resolution: not a bug
2009-07-21 17:03:21luke-jrcreate