mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-19 23:32:36 -05:00
fix: url-encode repo paths with spaces
This commit is contained in:
+3
-2
@@ -23,6 +23,7 @@ import shutil
|
|||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import urllib.error
|
import urllib.error
|
||||||
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -328,9 +329,9 @@ def _download_one(
|
|||||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if f.get("release_asset"):
|
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:
|
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")
|
tmp_path = dest.with_suffix(dest.suffix + ".tmp")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user