Skip to content

Commit

Permalink
Bug 1571589 - Use urlparse rather relying on just splitting on / bein…
Browse files Browse the repository at this point in the history
…g enough. r=tomprince

Differential Revision: https://phabricator.services.mozilla.com/D40738
  • Loading branch information
glandium committed Aug 7, 2019
1 parent 392c0b5 commit 34a2eeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion taskcluster/scripts/misc/fetch-content
Expand Up @@ -19,6 +19,7 @@ import sys
import tarfile
import tempfile
import time
import urllib.parse
import urllib.request

try:
Expand Down Expand Up @@ -328,7 +329,7 @@ def fetch_and_extract(url, dest_dir, extract=True, sha256=None, size=None):
the destination directory.
"""

basename = url.split('/')[-1]
basename = urllib.parse.urlparse(url).path.split('/')[-1]
dest_path = dest_dir / basename

download_to_path(url, dest_path, sha256=sha256, size=size)
Expand Down

0 comments on commit 34a2eeb

Please sign in to comment.