From ccf2385543d107e9e29920ec5f069ce4907e9b02 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 30 Jan 2012 02:02:41 +0400 Subject: [PATCH] Create savepath dir before attempt to write anything into it --- config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.py b/config.py index fdfc38e17..c9842f7d2 100644 --- a/config.py +++ b/config.py @@ -50,11 +50,15 @@ def defPaths(): # Redirect stderr to file if we're requested to do so stderrToFile = getattr(configforced, "stderrToFile", None) if stderrToFile is True: + if not os.path.exists(savePath): + os.mkdir(savePath) sys.stderr = open(os.path.join(savePath, "error_log.txt"), "w") # Same for stdout stdoutToFile = getattr(configforced, "stdoutToFile", None) if stdoutToFile is True: + if not os.path.exists(savePath): + os.mkdir(savePath) sys.stdout = open(os.path.join(savePath, "output_log.txt"), "w") # Static EVE Data from the staticdata repository, should be in the staticdata directory in our pyfa directory