From 55dcc3e8bb8f3e6ce61c50730e41a1b04ef32f17 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 6 Aug 2005 09:33:48 +0000 Subject: [PATCH] create LOGPATH folder if it doesn't exists and ~/.gajim exists --- src/common/logger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/logger.py b/src/common/logger.py index 2636222fa..da8a98973 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -41,11 +41,14 @@ class Logger: print _('%s is file but it should be a directory') % dot_gajim print _('Gajim will now exit') sys.exit() - if os.path.isdir(dot_gajim): + elif os.path.isdir(dot_gajim): if os.path.isfile(LOGPATH): print _('%s is file but it should be a directory') % LOGPATH print _('Gajim will now exit') sys.exit() + elif not os.path.exists(LOGPATH): + print _('creating %s directory') % LOGPATH + os.mkdir(LOGPATH) else: # dot_gajim doesn't exist if dot_gajim: # is '' on win9x so avoid that print _('creating %s directory') % dot_gajim