New submission from Cristi Fati:

In WinPE environment (at least this is where I found it, but there might be 
cases where this issue could be spotted in normal Windows), some folders might 
have some of the FILETIME structures reset (because of RAMDrive?). When the 
conversion between WIN style (100 * nsecs from  1601/01/01) to UX style (secs 
from 1970/01/01) is taking place (epoch is being substracted), it could yield 
invalid filetime values (that will be reported by os.stat).

The attached patch simply goes around this initializing the UX timestamps to 0.

It was found in Python-2.7.3, the patch is for 2.7.8, but I think it can be 
reproduced with all the newer versions.

----------
components: Interpreter Core, Windows
files: Python-2.7.8-invalid_filetimes.patch
keywords: patch
messages: 240875
nosy: CristiFati, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Invalid timestamps reported by os.stat() when Windows FILETIME 
structures are mistakenly reset.
type: behavior
versions: Python 2.7
Added file: 
http://bugs.python.org/file38985/Python-2.7.8-invalid_filetimes.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to