Skip to content

Commit

Permalink
fix some bugs in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
azmiao committed Jul 6, 2022
1 parent fd71a74 commit c95dab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions uma_almanac/get_all_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion uma_almanac/update_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit c95dab0

Please sign in to comment.