From 702040954391f5622fe54d5b3dd4614346fe8c3b Mon Sep 17 00:00:00 2001 From: ylytdeng Date: Tue, 10 Mar 2026 17:21:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20full=5Fdecrypt=20=E5=86=99=E5=85=A5?= =?UTF-8?q?=E5=89=8D=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BA=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit full_decrypt 打开 out_path 写入时未创建父目录, 首次运行 monitor_web 且 decrypted/ 不存在时会报 FileNotFoundError。 Fixes #22 Co-Authored-By: Claude Opus 4.6 --- monitor_web.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor_web.py b/monitor_web.py index 76cdfc9..e61ac86 100644 --- a/monitor_web.py +++ b/monitor_web.py @@ -367,6 +367,7 @@ def full_decrypt(db_path, out_path, enc_key): file_size = os.path.getsize(db_path) total_pages = file_size // PAGE_SZ + os.makedirs(os.path.dirname(out_path), exist_ok=True) with open(db_path, 'rb') as fin, open(out_path, 'wb') as fout: for pgno in range(1, total_pages + 1): page = fin.read(PAGE_SZ)