[Python-Dev] os.utime on directories: bug fix or new feature?

"Martin v. Löwis" martin at v.loewis.de
Sun Oct 15 15:13:21 CEST 2006


In Python 2.5.0 and earlier, it is not possible to modify
the time stamps of a directory (mtime and atime) on Windows.
The reason is that you cannot "open" (CreateFile) a
directory.

On W9x, it isn't possible, period. On WNT+, it's possible
if you pass FILE_FLAG_BACKUP_SEMANTICS to CreateFile.
I just applied patch #1576166 to the trunk which does that.


Should I backport the patch to 2.5, as it is a bug that
you can modify the time stamps of regular files but not
directories? Or should I not backport as it is a new
feature that you can now adjust the time stamps of a
directory, and couldn't before?

Anthony, can you please pronounce?

Regards,
Martin


More information about the Python-Dev mailing list