Fix the normalize_needed regex to properly match //
authorZac Medico <zmedico@gentoo.org>
Wed, 17 Oct 2007 21:44:10 +0000 (21:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 17 Oct 2007 21:44:10 +0000 (21:44 -0000)
anywhere in the path. Also add support for detection
of . or .. where appropriate.

svn path=/main/trunk/; revision=8166

pym/portage/dbapi/vartree.py

index 2b5e6efbd002aec2e1e6436451c22dfe2d6b2e7e..d73c4a117fccee66622fb459339b293ee158cc09 100644 (file)
@@ -823,7 +823,7 @@ class dblink(object):
        """
 
        import re
-       _normalize_needed = re.compile(r'//|^[^/]|.+/$')
+       _normalize_needed = re.compile(r'.*//.*|^[^/]|.+/$|(^|.*/)\.\.?(/.*|$)')
 
        def __init__(self, cat, pkg, myroot, mysettings, treetype=None,
                vartree=None):