]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- do not break when pkg name has '+' or '.' signs in it
authorMariusz Mazur <mmazur@pld-linux.org>
Fri, 20 May 2005 13:12:24 +0000 (13:12 +0000)
committerMariusz Mazur <mmazur@pld-linux.org>
Fri, 20 May 2005 13:12:24 +0000 (13:12 +0000)
Changed files:
    modules/ftptree.py -> 1.17

modules/ftptree.py

index 8848f5ec93f3b2f39ea34d2911d58849768481bb..6fdc1b40040639926c475fd8fe905ecbc269cd05 100644 (file)
@@ -248,7 +248,9 @@ class FtpTree(BaseFtpTree):
     # Used more than once filter functions
 
     def __find_other_pkgs(self, pkg, tree):
-        ziewre=re.compile(string.join(pkg.name.split('-')[:-2], '-')+'-[^-]*-[^-]*$')
+        pkgname=string.join(pkg.name.split('-')[:-2], '-')
+        escapedpkgname=pkgname.replace('.', '\.').replace('+', '\+')
+        ziewre=re.compile(escapedpkgname+'-[^-]*-[^-]*$')
         def filter_other_pkgs(x):
             if ziewre.match(x) and not x == pkg.name:
                 return True
This page took 0.040738 seconds and 4 git commands to generate.