Skip to content

Commit

Permalink
fixed file auto generation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ra1ny-Yuki committed Jun 26, 2022
1 parent b1ee8fa commit 72a7004
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions mcd_task/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def on_player_joined(server: PluginServerInterface, player: str, info: Info):
def on_load(server: PluginServerInterface, prev_module):
if prev_module is not None:
pass
if not os.path.isdir(DATA_FOLDER):
os.makedirs(DATA_FOLDER)
GlobalVariables.set_config(Config.load(server))
GlobalVariables.setup_task_manager(TaskManager.load())
register_cmd_tree(server)
Expand Down
2 changes: 2 additions & 0 deletions mcd_task/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

# Data folder
DATA_FOLDER = "./config/task"
if not os.path.isdir(DATA_FOLDER):
os.makedirs(DATA_FOLDER)
# Config file path
CONFIG_PATH = os.path.join(DATA_FOLDER, "config.json")
# Task file path
Expand Down
3 changes: 2 additions & 1 deletion mcd_task/global_variables.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import logging
import os.path
import re
import types
from typing import Optional, Union, TYPE_CHECKING
from mcdreforged.api.all import RTextBase, RTextList, RText, RAction, ServerInterface, MCDReforgedLogger

from mcd_task.config import Config
from mcd_task.constants import LOG_PATH, PREFIX, DEBUG_MODE
from mcd_task.constants import LOG_PATH, PREFIX, DEBUG_MODE, DATA_FOLDER


if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "mcd_task",
"version": "2.3.0+build.62",
"version": "2.3.1+build.63",
"name": "Task",
"description": {
"en_us": "A plugin to show tasks of project in progress",
Expand Down

0 comments on commit 72a7004

Please sign in to comment.