From: Zac Medico Date: Fri, 15 Jun 2007 22:40:42 +0000 (-0000) Subject: Make the collision-protect loop check for existance of the destination file before... X-Git-Tag: v2.1.3~215 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6;p=portage.git Make the collision-protect loop check for existance of the destination file before checking if it's owned. (trunk r6858) svn path=/main/branches/2.1.2/; revision=6859 --- diff --git a/pym/portage.py b/pym/portage.py index 31de417f1..fce0c27e3 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7429,6 +7429,15 @@ class dblink: 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