Skip to content

Commit

Permalink
Merge pull request #387 from CovenEsme/exe-creates-dir-structure
Browse files Browse the repository at this point in the history
Ensure the correct dir structure exists when running the rando
  • Loading branch information
CovenEsme authored Jun 28, 2024
2 parents d72ad1a + 07d654c commit b284345
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sshdrando.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit b284345

Please sign in to comment.