[issue10148] st_mtime differs after shutil.copy2

Peter report at bugs.python.org
Fri Jan 28 15:50:21 CET 2011


Peter <p.j.a.cock at googlemail.com> added the comment:

I'm also seeing this on 32bit Windows XP using Python 3.1.2, and Python 3.2rc1 on a local NTFS filesystem.

e.g. from os.stat(filename).st_mtime after using shutil.copy2(...)

1293634856.1402586 source
1293634856.1402581 copied

I've been using shutil.copy2 then expecting st_mtime will be equal (or at least that the copy file will be newer than the original). As you can see in this case, the copy is sometimes a fraction older.

The same issue occurs using shutil.copy then shutils.copystat (probably not a surprise).

----------
nosy: +maubp

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


More information about the Python-bugs-list mailing list