diff --git a/pywxdump/wx_info/merge_db.py b/pywxdump/wx_info/merge_db.py index 30da3cdd..acb7d5a4 100644 --- a/pywxdump/wx_info/merge_db.py +++ b/pywxdump/wx_info/merge_db.py @@ -20,6 +20,9 @@ def merge_copy_db(db_path, save_path): # 合并相同名称的数据库 MSG0-MSG9.db def merge_msg_db(db_path: list, save_path: str, CreateTime: int = 0): # CreateTime: 从这个时间开始的消息 10位时间戳 + # 判断save_path是否为文件夹 + if os.path.isdir(save_path): + save_path = os.path.join(save_path, "merge_MSG.db") merged_conn = sqlite3.connect(save_path) merged_cursor = merged_conn.cursor() @@ -112,6 +115,9 @@ def merge_msg_db(db_path: list, save_path: str, CreateTime: int = 0): # CreateT def merge_media_msg_db(db_path: list, save_path: str): + # 判断save_path是否为文件夹 + if os.path.isdir(save_path): + save_path = os.path.join(save_path, "merge_Media.db") merged_conn = sqlite3.connect(save_path) merged_cursor = merged_conn.cursor()