forked from p15670423/monkey
island: Find MONKEY_ISLAND_ABS_PATH by __file__ instead of os.getcwd()
We can't be sure what $PWD is when Monkey Island is started.
This commit is contained in:
parent
184594f509
commit
a8570987a6
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from monkey_island.cc.environment.utils import is_windows_os
|
||||
|
||||
|
@ -14,7 +15,7 @@ def get_default_data_dir() -> str:
|
|||
|
||||
SERVER_CONFIG_FILENAME = "server_config.json"
|
||||
|
||||
MONKEY_ISLAND_ABS_PATH = os.path.join(os.getcwd(), "monkey_island")
|
||||
MONKEY_ISLAND_ABS_PATH = str(Path(__file__).resolve().parent.parent.parent)
|
||||
|
||||
DEFAULT_DATA_DIR = os.path.expandvars(get_default_data_dir())
|
||||
|
||||
|
|
Loading…
Reference in New Issue