OSDN Git Service

win32: need confpath created first
authorTumagonx <mr_tiar@gmail.com>
Fri, 25 Nov 2011 18:04:56 +0000 (19:04 +0100)
committerMartin Renold <martinxyz@gmx.ch>
Fri, 25 Nov 2011 18:04:56 +0000 (19:04 +0100)
(a blocker bug in 1.0.0)
https://gna.org/bugs/?17999

gui/main.py

index 7ac1f88..faf1c1c 100644 (file)
@@ -6,6 +6,7 @@
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
 
+import os
 import pygtk
 pygtk.require('2.0')
 import gtk
@@ -34,7 +35,9 @@ def main(datadir, extradata, default_confpath):
     if sys.platform == 'win32':
         # defaulting mypaint with logfile http://gna.org/bugs/?17999
         if not options.logfile:
-            options.logfile = default_confpath+"\mypaint_error.log"
+            options.logfile = os.path.join(default_confpath, "mypaint_error.log")
+            if not os.path.isdir(default_confpath):
+                os.mkdir(default_confpath)
 
     if options.logfile:
         print 'Python prints are redirected to', options.logfile, 'after this one.'