Skip to content

Commit

Permalink
ensure relpath uses /
Browse files Browse the repository at this point in the history
  • Loading branch information
yorinasub17 committed Apr 10, 2019
1 parent 539e671 commit 3241d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pex/third_party/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _filter_names(self, relpath, pattern, group):
# We use '/' here instead of os.sep because the zip file format spec specifies that paths must
# use forward slashes. See section 4.4.17 of
# https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
relpath_pat = '{}/'.format(relpath) if relpath else ''
relpath_pat = '{}/'.format(relpath.replace(os.sep, '/')) if relpath else ''
pat = re.compile(r'^{}{}{}$'.format(self.prefix, relpath_pat, pattern))
with contextlib.closing(zipfile.ZipFile(self.zipfile_path)) as zf:
for name in zf.namelist():
Expand Down

0 comments on commit 3241d07

Please sign in to comment.