only create dirs if they dont exist - fixes crash

This commit is contained in:
Marcos Pinto 2008-07-13 20:16:50 +00:00
parent 4f50438b61
commit ceaa06d1ad
1 changed files with 4 additions and 2 deletions

View File

@ -61,9 +61,11 @@ def start_ui():
if deluge.common.windows_check(): if deluge.common.windows_check():
if options.config: if options.config:
if not os.path.exists(options.config):
os.makedirs(options.config) os.makedirs(options.config)
logfile = os.path.join(options.config, "deluge.log") logfile = os.path.join(options.config, "deluge.log")
else: else:
if not os.path.exists(deluge.common.get_default_config_dir()):
os.makedirs(deluge.common.get_default_config_dir()) os.makedirs(deluge.common.get_default_config_dir())
logfile = deluge.common.get_default_config_dir("deluge.log") logfile = deluge.common.get_default_config_dir("deluge.log")