Skip to content

Commit

Permalink
fix 无法auto无法使用的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Apr 22, 2024
1 parent fbc6a7f commit 9af61ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pywxdump/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ def init_key():
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")
# 检查文件夹中文件是否被占用
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)
time.sleep(1)
Expand Down

0 comments on commit 9af61ad

Please sign in to comment.