diff --git a/src/gajim.py b/src/gajim.py
index 0f69b35c7b6bb7a561836444242026a68a14f134..08968a1730e0a150b3ca647727cb6e6cd2254fe2 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