Jason R. Coombs <jar...@jaraco.com> added the comment: Digging deeper with the Visual Studio debugger, I discovered the following interesting outcome (run with cmd.exe):
@echo off mklink /d sample sample-target mkdir sample-target echo "" > sample-target\__init__.py :: Before KB2467174, returns 0; after, returns -1 python -c "import ctypes; buf = (ctypes.c_char*256)(); print(ctypes.windll.msvcr90._wstat64i32(u'sample', ctypes.byref(buf)))" :: Always returns 13 python -c "import ctypes; fd = ctypes.c_int(-1); print(ctypes.windll.msvcrt._wsopen_s(ctypes.byref(fd), u'sample', 0, 0x40, 0))" rmdir sample rmdir /s /q sample-target The call to _wstat64i32 is returning -1 with the patched CRT... but when I traced _wstat64i32 (on a machine with the patched CRT), it called _wsopen_s, which apparently always returns -1. So my guess is that the patched CRT changed something about _wstat64i32 such that it doesn't defer to _wsopen_s. I'm going to see if I can get an early version of Visual Studio that I can trace where _wstat64i32 doesn't fail. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6727> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com