From bb408d0a4559d7437f7b005d266af4b833ffd261 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Thu, 21 Feb 2019 10:23:30 -0800 Subject: [PATCH] Add missing / in output path for log --- compiler/debug.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/debug.py b/compiler/debug.py index b7819bcc..9ce1bf3f 100644 --- a/compiler/debug.py +++ b/compiler/debug.py @@ -50,6 +50,14 @@ def print_raw(str): def log(str): if globals.OPTS.output_name != '': if log.create_file: + # We may have not yet read the config, so we need to ensure + # it ends with a / + # This is also done in read_config if we change the path + # FIXME: There's actually a bug here. The first few lines + # could be in one log file and after read_config it could be + # in another log file if the path or name changes. + if not globals.OPTS.output_path.endswith('/'): + globals.OPTS.output_path += "/" compile_log = open(globals.OPTS.output_path + globals.OPTS.output_name + '.log', "w+") log.create_file = 0