From 7247374076a7aa8dee1af2aa2105ced4fcfeacce Mon Sep 17 00:00:00 2001 From: wcbing Date: Thu, 12 Sep 2024 10:41:36 +0800 Subject: [PATCH] remove the parm in file path --- get/module/check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get/module/check.py b/get/module/check.py index 295cc4c..509e785 100644 --- a/get/module/check.py +++ b/get/module/check.py @@ -7,7 +7,7 @@ def download(url, file_type): file_dir = os.path.join(file_type, "/".join(url.split("/")[:-1])) if not os.path.exists(file_dir): os.makedirs(file_dir) - file_path = os.path.join(file_type, url) + file_path = os.path.join(file_type, url.split("?")[0]) with requests.get(url, stream=True) as res: with open(file_path, "wb") as fw: for chunk in res.iter_content(chunk_size=8192): @@ -35,7 +35,7 @@ def check_download(name, version, url, arch, file_type): (version, url, name), ) # remove old version - old_file_path = os.path.join(file_type, db_url) + old_file_path = os.path.join(file_type, db_url.split("?")[0]) if os.path.exists(old_file_path): os.remove(old_file_path) else: