From: Zac Medico Date: Fri, 27 Nov 2009 22:37:57 +0000 (-0000) Subject: In movefile(), skip os.utime() when os.rename() succeeds, in order to X-Git-Tag: v2.1.7.8~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42027856c58b700b4637cd29fb75c33896b1f5aa;p=portage.git In movefile(), skip os.utime() when os.rename() succeeds, in order to completely preserve mtime resolution. (trunk r14897) svn path=/main/branches/2.1.7/; revision=14902 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 25ef6fb3f..e22854996 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -7565,6 +7565,8 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None, try: if hardlinked: newmtime = long(os.stat(dest).st_mtime) + elif not renamefailed: + newmtime = long(sstat.st_mtime) else: if newmtime is not None: os.utime(dest, (newmtime, newmtime))