diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index e995716f6e..a5d29f2917 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -366,9 +366,9 @@ def expected_archive_files(self): 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(url_path)) + clean_url = os.path.basename( + sup.sanitize_file_path(self.default_fetcher.url)) fnames.append(clean_url) if self.mirror_paths: