Closed jswetzen closed 7 years ago
Apparently, EEXIST is not reliable, but if the directory exists that would definitely raise an OSError. That's the only acceptable error case, so allow only that. The current implementation would cause problems if the path exists and is a file.
This is copying the CPython implementation: https://github.com/python/cpython/blob/master/Lib/pathlib.py#L1219
Related to takluyver/pynsist#118
That's annoying. Another reason to drop support for older Pythons (#99).
Apparently, EEXIST is not reliable, but if the directory exists that would definitely raise an OSError. That's the only acceptable error case, so allow only that. The current implementation would cause problems if the path exists and is a file.
This is copying the CPython implementation: https://github.com/python/cpython/blob/master/Lib/pathlib.py#L1219
Related to takluyver/pynsist#118