From: Zac Medico Date: Fri, 15 Jun 2007 22:39:58 +0000 (-0000) Subject: Make the collision-protect loop check for existance of the destination file before... X-Git-Tag: v2.2_pre1~1232 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ecd48c6dfb08da5830a303ea8c99a1ff0997932;p=portage.git Make the collision-protect loop check for existance of the destination file before checking if it's owned. svn path=/main/trunk/; revision=6858 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 5e397f099..5affc5f07 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1415,6 +1415,15 @@ class dblink(object): i = i + 1 if i % 1000 == 0: print str(i)+" files checked ..." + dest_path = normalize_path( + os.path.join(destroot, f.lstrip(os.path.sep))) + try: + dest_lstat = os.lstat(dest_path) + except EnvironmentError, e: + if e.errno != errno.ENOENT: + raise + del e + continue if f[0] != "/": f="/"+f isowned = False