[issue19715] test_touch_common failure under Windows

Steve Dower report at bugs.python.org
Sat Nov 23 08:39:50 CET 2013


Steve Dower added the comment:

Or as Martin suggested earlier, time.time() could be returning different values to what the system uses when it creates the file (which I assume is GetSystemTimeAsFileTime/SetFileTime or the kernel-mode equivalent).

I only looked briefly at the touch() implementation, but I believe if the file doesn't exist it just creates it and doesn't try to set the time?

So in the first touch(), the system will set the time. For the second touch(), the file exists and so Python calls utime(... time.time()).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19715>
_______________________________________


More information about the Python-bugs-list mailing list