From c95dab05d49fd38b625439b76c7c673f43eb30b1 Mon Sep 17 00:00:00 2001 From: azmiao <2362020227@qq.com> Date: Wed, 6 Jul 2022 16:56:19 +0800 Subject: [PATCH] fix some bugs in linux --- uma_almanac/get_all_info.py | 4 ++-- uma_almanac/update_data.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uma_almanac/get_all_info.py b/uma_almanac/get_all_info.py index c2a9076..1af1c71 100644 --- a/uma_almanac/get_all_info.py +++ b/uma_almanac/get_all_info.py @@ -64,7 +64,7 @@ async def get_chara(): # 判断是否已经签到过 async def judge(group_id, user_id): - current_dir = os.path.join(os.path.dirname(__file__), f'data\{group_id}.json') + current_dir = os.path.join(os.path.dirname(__file__), f'data/{group_id}.json') if not os.path.exists(os.path.join(os.path.dirname(__file__), f'data/')): os.mkdir(os.path.join(os.path.dirname(__file__), f'data/')) if os.path.exists(current_dir): @@ -76,7 +76,7 @@ async def judge(group_id, user_id): # 若签到过就获取已经签到过的信息 async def get_almanac_info(group_id, user_id): - current_dir = os.path.join(os.path.dirname(__file__), f'data\{group_id}.json') + current_dir = os.path.join(os.path.dirname(__file__), f'data/{group_id}.json') with open(current_dir, 'r', encoding = 'UTF-8') as f: config = json.load(f) user_id = str(user_id) diff --git a/uma_almanac/update_data.py b/uma_almanac/update_data.py index 84a1fa8..0d217a0 100644 --- a/uma_almanac/update_data.py +++ b/uma_almanac/update_data.py @@ -17,7 +17,7 @@ async def create_json(_current_dir): async def write_info(*args): group_id = args[0] user_id = args[1] - _current_dir = os.path.join(os.path.dirname(__file__), f'data\{group_id}.json') + _current_dir = os.path.join(os.path.dirname(__file__), f'data/{group_id}.json') config = await create_json(_current_dir) config[user_id] = { "actions": args[2],