From ceaa06d1ad1244f3b2aca016cbeddbff8edf43fd Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 13 Jul 2008 20:16:50 +0000 Subject: [PATCH] only create dirs if they dont exist - fixes crash --- deluge/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/main.py b/deluge/main.py index df92d2818..8f651d58a 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -61,10 +61,12 @@ def start_ui(): if deluge.common.windows_check(): if options.config: - os.makedirs(options.config) + if not os.path.exists(options.config): + os.makedirs(options.config) logfile = os.path.join(options.config, "deluge.log") else: - os.makedirs(deluge.common.get_default_config_dir()) + if not os.path.exists(deluge.common.get_default_config_dir()): + os.makedirs(deluge.common.get_default_config_dir()) logfile = deluge.common.get_default_config_dir("deluge.log") sys.stdout = open(logfile, "wb")