[issue37074] os.stat() does not work for NUL and CON

2019-08-22 Thread Eryk Sun
Eryk Sun added the comment: > Where it was fixed? It was addressed in issue 37834. PR 15231 includes a rewrite of win32_xstat_impl. The file type was needed, so the rewrite could also address the problem of character devices such as CON and NUL. --

[issue37074] os.stat() does not work for NUL and CON

2019-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Where it was fixed? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37074] os.stat() does not work for NUL and CON

2019-08-21 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37074] os.stat() does not work for NUL and CON

2019-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR Eryk? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37074] os.stat() does not work for NUL and CON

2019-06-02 Thread Michele Angrisano
Change by Michele Angrisano : -- nosy: -mangrisano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37074] os.stat() does not work for NUL and CON

2019-05-28 Thread Eryk Sun
Eryk Sun added the comment: > GetFullPathNameW(path, sizeof(fullPath), That should be sizeof(fullPath) / sizeof(WCHAR), or use Py_ARRAY_LENGTH, or just hard code 8. That's probably not the only mistake. But this is just an example to discuss the details and alternatives. --

[issue37074] os.stat() does not work for NUL and CON

2019-05-28 Thread Eryk Sun
Eryk Sun added the comment: Opening "CON" (i.e. r"\\.\CON") fails with ERROR_INVALID_PARAMETER (87) because it has to be opened with either GENERIC_READ or GENERIC_WRITE data access in order to map it to either the console input buffer or active screen buffer. The CreateFileW call in stat()

[issue37074] os.stat() does not work for NUL and CON

2019-05-28 Thread Michele Angrisano
Michele Angrisano added the comment: I've tried to reproduce this behavior on my Mac with python3.8 and python 3.7 but I couldn't. If 'nul' doesn't exist, it raises a FileNotFound exception as it should do. If 'nul' exists, it shows me the right output. Same behavior with 'con'. --

[issue37074] os.stat() does not work for NUL and CON

2019-05-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> os.stat('nul') Traceback (most recent call last): File "", line 1, in OSError: [WinError 1] Incorrect function: 'nul' >>> os.stat('con') Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect: