summaryrefslogtreecommitdiff
path: root/filelist.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-08-17 21:35:46 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2009-08-17 21:35:46 +0000
commitcc6230244cd7ff8d13b3cc9c0c493682b5560ff9 (patch)
treedc7891953ea4ffc6de2b7d5922024c3aae605505 /filelist.py
parent7d70ca7551824bdf4950932bd5d68e8a982cf1d0 (diff)
downloadpython-setuptools-git-cc6230244cd7ff8d13b3cc9c0c493682b5560ff9.tar.gz
Merged revisions 74493 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74493 | tarek.ziade | 2009-08-17 23:28:34 +0200 (Mon, 17 Aug 2009) | 1 line fixed how fnmatch.translate is used (since it has changed in r74475 for #6665). Now the code is not harcoding the usage of $ anymore ........
Diffstat (limited to 'filelist.py')
-rw-r--r--filelist.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/filelist.py b/filelist.py
index 58a2bfb1..06a8da9a 100644
--- a/filelist.py
+++ b/filelist.py
@@ -312,7 +312,9 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0):
pattern_re = ''
if prefix is not None:
- prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $
+ # ditch end of pattern character
+ empty_pattern = glob_to_re('')
+ prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)]
pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re)
else: # no prefix -- respect anchor flag
if anchor: