diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 8b4efcf387b..dcce1ebf472 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -487,7 +487,7 @@ def _generate_fetchers(self, mirror_only=False) -> Generator["fs.FetchStrategy", # Insert fetchers in the order that the URLs are provided. fetchers[:0] = ( fs.from_url_scheme( - url_util.join(mirror.fetch_url, self.mirror_layout.path), + url_util.join(mirror.fetch_url, *self.mirror_layout.path.split(os.sep)), checksum=digest, expand=expand, extension=extension,