diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index 9c51946b..738a3ae9 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -9,7 +9,7 @@ import shlex import sys from Main import main -from Utils import is_bundled, close_console, output_path +from Utils import is_bundled, close_console class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter): @@ -294,9 +294,6 @@ def parse_arguments(argv, no_defaults=False): def start(): args = parse_arguments(None) - if args.outputpath and os.path.isdir(args.outputpath): - output_path.cached_path = args.outputpath - if is_bundled() and len(sys.argv) == 1: # for the bundled builds, if we have no arguments, the user # probably wants the gui. Users of the bundled build who want the command line diff --git a/Main.py b/Main.py index cc995d17..b3a9ff7a 100644 --- a/Main.py +++ b/Main.py @@ -22,6 +22,13 @@ from Utils import output_path, parse_names_string __version__ = '0.6.3-pre' def main(args, seed=None): + if args.outputpath: + try: + os.mkdir(args.outputpath) + except OSError: + pass + output_path.cached_path = args.outputpath + start = time.process_time() # initialize the world