Fix stage with uri params (#31618)

* don't determine extension of a url

* parse url to drop query params from filename
This commit is contained in:
Harmen Stoppels 2022-07-25 10:31:13 +02:00 committed by GitHub
parent fe0643a14e
commit b56871dd9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -530,7 +530,7 @@ def expand(self):
"Failed on expand() for URL %s" % self.url) "Failed on expand() for URL %s" % self.url)
if not self.extension: if not self.extension:
self.extension = extension(self.url) self.extension = extension(self.archive_file)
if self.stage.expanded: if self.stage.expanded:
tty.debug('Source already staged to %s' % self.stage.source_path) tty.debug('Source already staged to %s' % self.stage.source_path)

View File

@ -366,9 +366,9 @@ def expected_archive_files(self):
fnames = [] fnames = []
expanded = True expanded = True
if isinstance(self.default_fetcher, fs.URLFetchStrategy): if isinstance(self.default_fetcher, fs.URLFetchStrategy):
url_path = url_util.parse(self.default_fetcher.url).path
expanded = self.default_fetcher.expand_archive expanded = self.default_fetcher.expand_archive
clean_url = os.path.basename( clean_url = os.path.basename(sup.sanitize_file_path(url_path))
sup.sanitize_file_path(self.default_fetcher.url))
fnames.append(clean_url) fnames.append(clean_url)
if self.mirror_paths: if self.mirror_paths: