| |
@@ -4464,7 +4464,9 @@
|
| |
# find out the format of the source file path. From URL use just the file name.
|
| |
# We want to keep hierarchy of the files if possible
|
| |
res = urllib.parse.urlparse(file_location)
|
| |
- if res.scheme and res.netloc:
|
| |
+ if res.scheme and res.fragment:
|
| |
+ source_files.append(os.path.basename(res.fragment))
|
| |
+ elif res.scheme and res.netloc:
|
| |
source_files.append(os.path.basename(res.path))
|
| |
else:
|
| |
source_files.append(file_location)
|
| |
Some download services do not have the actual filename in the URL. Packagers work around that by adding a fragment to the URL. This is then ignored by any server, but tricks RPM into getting the correct filename.
Example:
The filename is obviously
actix-0.13.0.crate
, but rpkg without this patch will come up withdownload
.