Skip to content

Commit

Permalink
merge 输出如果不是文件,则自动创建文件
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Dec 9, 2023
1 parent 6eef35d commit d091ba3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pywxdump/wx_info/merge_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit d091ba3

Please sign in to comment.