summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-12-11 19:50:32 +0000
committerZac Medico <zmedico@gentoo.org>2009-12-11 19:50:32 +0000
commitcd657ed1bcbc9780bc7bfda27e6e714e27361fdf (patch)
treef00d21edb6699041edc3d3b15c7031058427d7e3 /pym
parent7864c8e164258a54c140ee5974fcb5c0ff6ab69c (diff)
downloadportage-cd657ed1bcbc9780bc7bfda27e6e714e27361fdf.tar.gz
portage-cd657ed1bcbc9780bc7bfda27e6e714e27361fdf.tar.bz2
portage-cd657ed1bcbc9780bc7bfda27e6e714e27361fdf.zip
In movefile() timestamp preservation code, use another loop to search for
another digit of precision. svn path=/main/trunk/; revision=15037
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 09834dcda..48561b5f0 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7682,6 +7682,15 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
mtime_str = mtime_str[:-1]
newmtime = float(mtime_str)
if int_mtime == long(newmtime):
+ another_digit = None
+ for i in range(1, 9):
+ i_str = str(i)
+ if int_mtime != long(float(mtime_str + i_str)):
+ break
+ else:
+ another_digit = i_str
+ if another_digit is not None:
+ mtime_str += another_digit
break
elif len(mtime_str) <= min_len:
# This shouldn't happen, but let's make sure