[issue37769] Windows Store installer should warn user about MAX_PATH
Eryk Sun
report at bugs.python.org
Mon Aug 5 18:44:32 EDT 2019
Eryk Sun <eryksun at gmail.com> added the comment:
> First it seems the error is being raised incorrectly - winerror 2 is
> for file not found, but it's being passed as errno 2.
I think this only happens with open(). The _io module could use the CRT's _doserrno value to call PyErr_SetExcFromWindowsErrWithFilenameObject. We can rely on _doserrno if _wopen fails.
Otherwise this is the expected mapping from Windows ERROR_PATH_NOT_FOUND (3) or ERROR_FILENAME_EXCED_RANGE (206) to POSIX ENOENT (2). The Windows error in the case of path that's too long is not ERROR_FILE_NOT_FOUND (2).
----------
nosy: +eryksun
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37769>
_______________________________________
More information about the Python-bugs-list
mailing list