Use a safer method to join the path when deciding if the current merge offset is...
authorZac Medico <zmedico@gentoo.org>
Wed, 12 Jul 2006 09:59:01 +0000 (09:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 12 Jul 2006 09:59:01 +0000 (09:59 -0000)
svn path=/main/trunk/; revision=3837

pym/portage.py

index dccdc706bb5289b3cee1e154dc4b0db1edd423e2..7a614dbd63d0311f00e98c1a8db97363020d965a 100644 (file)
@@ -6442,7 +6442,10 @@ class dblink:
                        # We need mydest defined up here to calc. protection paths.  This is now done once per
                        # directory rather than once per file merge.  This should really help merge performance.
                        # Trailing / ensures that protects/masks with trailing /'s match.
-                       mytruncpath = os.path.join(destroot, offset) + os.path.sep
+                       mytruncpath = os.path.sep + \
+                               os.path.join(
+                                       destroot.strip(os.path.sep), offset.strip(os.path.sep)) + \
+                               os.path.sep
                        myppath=self.isprotected(mytruncpath)
                else:
                        mergelist=stufftomerge