fix 无法auto无法使用的问题。

This commit is contained in:
xaoyaoo 2024-04-22 22:34:51 +08:00
parent fbc6a7ff4f
commit 9af61ada3a

View File

@ -76,8 +76,12 @@ def init_key():
return ReJson(1002, body=f"my_wxid is required: {my_wxid}") return ReJson(1002, body=f"my_wxid is required: {my_wxid}")
out_path = os.path.join(g.tmp_path, "decrypted", my_wxid) if my_wxid else os.path.join(g.tmp_path, "decrypted") out_path = os.path.join(g.tmp_path, "decrypted", my_wxid) if my_wxid else os.path.join(g.tmp_path, "decrypted")
# 检查文件夹中文件是否被占用
if os.path.exists(out_path): if os.path.exists(out_path):
shutil.rmtree(out_path) try:
shutil.rmtree(out_path)
except PermissionError as e:
return ReJson(2001, body=str(e))
code, merge_save_path = decrypt_merge(wx_path=wx_path, key=key, outpath=out_path) code, merge_save_path = decrypt_merge(wx_path=wx_path, key=key, outpath=out_path)
time.sleep(1) time.sleep(1)