diff options
author | Tarek Ziade <tarek@ziade.org> | 2011-05-21 09:48:16 (GMT) |
---|---|---|
committer | Tarek Ziade <tarek@ziade.org> | 2011-05-21 09:48:16 (GMT) |
commit | ec9b76d282ecb3a1a113574f24b476ad3309e574 (patch) | |
tree | 93f88a0dcb9b63a6732d81a5b7c8cad9f91a191c /Lib/packaging/util.py | |
parent | 94449616daf968f7e031530c0c861079d31ff137 (diff) | |
download | cpython-ec9b76d282ecb3a1a113574f24b476ad3309e574.zip cpython-ec9b76d282ecb3a1a113574f24b476ad3309e574.tar.gz cpython-ec9b76d282ecb3a1a113574f24b476ad3309e574.tar.bz2 |
fixed the separator issues in packaging/resources+config
Diffstat (limited to 'Lib/packaging/util.py')
-rw-r--r-- | Lib/packaging/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/packaging/util.py b/Lib/packaging/util.py index bf31c31..15da9e6 100644 --- a/Lib/packaging/util.py +++ b/Lib/packaging/util.py @@ -939,7 +939,7 @@ class Mixin2to3: self.options, self.explicit) RICH_GLOB = re.compile(r'\{([^}]*)\}') -_CHECK_RECURSIVE_GLOB = re.compile(r'[^/,{]\*\*|\*\*[^/,}]') +_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]') _CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$') @@ -973,7 +973,9 @@ def _iglob(path_glob): if radical == '': radical = '*' else: + # we support both radical = radical.lstrip('/') + radical = radical.lstrip('\\') for path, dir, files in os.walk(prefix): path = os.path.normpath(path) for file in _iglob(os.path.join(path, radical)): |