[issue37517] Improve error messages for Windows reserved file names

Steve Dower report at bugs.python.org
Tue Jul 9 06:11:08 EDT 2019


Steve Dower <steve.dower at python.org> added the comment:

Presumably this is linked to issue37515 (why not just repurpose that one?), but I'm inclined to think this is okay provided:

* if the operation succeeds, no error/message is displayed
* if the operation fails, we only update the error message if one of the special filenames is the target

So probably this ought to be a special case in PyErr_SetFromWindowsErrWithFilename(). And either we need to search the string for the special names or find an API that will clarify it (GetFileAttributes?).

I definitely do not want every error message suggesting that this edge case may be the cause, and I don't want to prevent people using these names or purpose for their actual uses.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37517>
_______________________________________


More information about the Python-bugs-list mailing list