mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-25 04:22:48 +00:00
fix: url-encode repo paths with spaces
This commit is contained in:
parent
2118571ca2
commit
0a721fbef1
1 changed files with 3 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ import shutil
|
|||
import sys
|
||||
import tempfile
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
|
|
@ -328,9 +329,9 @@ def _download_one(
|
|||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if f.get("release_asset"):
|
||||
url = RELEASE_URL.format(asset=f["release_asset"])
|
||||
url = RELEASE_URL.format(asset=urllib.parse.quote(f["release_asset"], safe="/"))
|
||||
else:
|
||||
url = RAW_FILE_URL.format(path=f["repo_path"])
|
||||
url = RAW_FILE_URL.format(path=urllib.parse.quote(f["repo_path"], safe="/"))
|
||||
|
||||
tmp_path = dest.with_suffix(dest.suffix + ".tmp")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue