修复路径问题

This commit is contained in:
SiYuan 2024-02-09 17:38:15 +08:00
parent 7ba44f92e3
commit 87a48c5955
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class ExceptionHanding:
def parser_exc(self):
if isinstance(self.exc_value, PermissionError):
return f'权限错误,请使用管理员身份运行'
return f'权限错误,请使用管理员身份运行并将文件夹设置为可读写'
elif isinstance(self.exc_value, sqlite3.DatabaseError):
return '数据库错误请删除app文件夹后重启电脑再运行软件'
elif isinstance(self.exc_value, OSError) and self.exc_value.errno == 28:

View File

@ -310,7 +310,7 @@ class OutputMedia(QThread):
self.time_range = time_range
def run(self):
origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark)
origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark)
messages = msg_db.get_messages_by_type(self.contact.wxid, 34, time_range=self.time_range)
for message in messages:
is_send = message[4]