diff --git a/sshdrando.py b/sshdrando.py index 5ccfa6c1..21dc03e9 100644 --- a/sshdrando.py +++ b/sshdrando.py @@ -7,6 +7,7 @@ # for more info. mp.freeze_support() +from filepathconstants import PLANDO_PATH, PRESETS_PATH, SSHD_EXTRACT_PATH from util.arguments import get_program_args import logging @@ -23,6 +24,16 @@ filemode="w", ) +# Ensure the necessary directories are created +if not SSHD_EXTRACT_PATH.exists(): + SSHD_EXTRACT_PATH.mkdir() + +if not PLANDO_PATH.exists(): + PLANDO_PATH.mkdir() + +if not PRESETS_PATH.exists(): + PRESETS_PATH.mkdir() + # Imports here to prevent circular dependency if not args.nogui: from gui.main import start_gui