diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 84949c2e287..08a6e31b93c 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -488,7 +488,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,