Billy McCulloch added the comment:

I've also run into this bug on Windows. In my case, the tempdir path includes 
directories on a network share, which I lack write access permissions to. 
Python tries to generate a *lot* of files, and never figures out it should move 
on to another directory. The attached patch for tempdir.py resolves my issue.

In _get_default_tempdir() and _mkstemp_inner(), you want to know if the 
filename you tried to create already exists as a directory, not whether the 
parent directory is a directory – that's handled in _get_default_tempdir().

In mkdtemp(), attempting to create a directory with the same name as an 
existing directory does not throw a PermissionError, so the code is superfluous.

----------
nosy: +Billy McCulloch
Added file: http://bugs.python.org/file42704/master...bjmcculloch_patch-1.diff

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

Reply via email to