summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/fetch_strategy.py2
-rw-r--r--lib/spack/spack/stage.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 8f17e7768b..e52cceeaa0 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -530,7 +530,7 @@ class URLFetchStrategy(FetchStrategy):
"Failed on expand() for URL %s" % self.url)
if not self.extension:
- self.extension = extension(self.url)
+ self.extension = extension(self.archive_file)
if self.stage.expanded:
tty.debug('Source already staged to %s' % self.stage.source_path)
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index a5d29f2917..e995716f6e 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -366,9 +366,9 @@ class Stage(object):
fnames = []
expanded = True
if isinstance(self.default_fetcher, fs.URLFetchStrategy):
+ url_path = url_util.parse(self.default_fetcher.url).path
expanded = self.default_fetcher.expand_archive
- clean_url = os.path.basename(
- sup.sanitize_file_path(self.default_fetcher.url))
+ clean_url = os.path.basename(sup.sanitize_file_path(url_path))
fnames.append(clean_url)
if self.mirror_paths: