mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 11:02:04 +08:00
支持导入.7z包时自动移除部分特殊符号
This commit is contained in:
@@ -144,8 +144,15 @@ def InstallOtherWine():
|
||||
rfile = open(f"{programPath}/winelist.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# 创建映射
|
||||
name = os.path.splitext(os.path.basename(path[0]))[0]
|
||||
removeSymbol = ["(", ")", "(", ")", " ", "!", "@", "#",
|
||||
"$", "%", "^", "&", "*", "=", "[", "]",
|
||||
"{", "}", "\\", "/", "|", "?",
|
||||
"<", ">", "·", "「", ";", ":", ":",
|
||||
"?", "《", "》", ",", "。", ",", ".",
|
||||
"`", "~", "~", "、"]
|
||||
for i in removeSymbol:
|
||||
name.replace(i, "")
|
||||
unpackPath = f"{programPath}/{name}"
|
||||
shellCommand = f"""mkdir -p \"{unpackPath}\"
|
||||
7z x -y \"{path[0]}\" -o\"{unpackPath}\"
|
||||
|
||||
Reference in New Issue
Block a user