From: Zac Medico Date: Thu, 26 Nov 2009 21:59:51 +0000 (-0000) Subject: In movefile(), skip os.utime() when os.rename() succeeds, in order to X-Git-Tag: v2.2_rc53~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db47cf762436803aadaa8ed909a6fd1b3390f629;p=portage.git In movefile(), skip os.utime() when os.rename() succeeds, in order to completely preserve mtime resolution. svn path=/main/trunk/; revision=14897 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2641472e5..3246a3a51 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))