From 2fa280acbb9361b83cf3b73415e3f740e0f8672b Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 27 Oct 2010 09:37:56 +0200
Subject: [PATCH] create AppData/Gajim folder if it doesn't exists

---
 src/gajim.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gajim.py b/src/gajim.py
index 0f69b35c7b..08968a1730 100644
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -57,7 +57,10 @@ if os.name == 'nt':
 import warnings
 
 if os.name == 'nt':
-    log_file = os.path.join(os.environ['APPDATA'], 'Gajim', 'gajim.log')
+    log_path = os.path.join(os.environ['APPDATA'], 'Gajim')
+    if not os.path.exists(log_path):
+        os.mkdir(log_path, 0700)
+    log_file = os.path.join(log_path, 'gajim.log')
     fout = open(log_file, 'a')
     sys.stdout = fout
     sys.stderr = fout
-- 
GitLab