]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
Finnish layouttranslations, checked by Hannu Vuolasaho.
[lyx.git] / lib / configure.py
index ae987ef63f108be3b5cb66543f104acfa90e712d..e9c83ee27649e9863329199111066b5c03c84858 100644 (file)
@@ -62,7 +62,7 @@ def cmdOutput(cmd):
     '''
     if os.name == 'nt':
         b = False
-        cmd = 'cmd /d /c ' + cmd
+        cmd = 'cmd /d /c pushd ' + os.getcwd() + '&' + cmd
     else:
         b = True
     pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \
@@ -109,9 +109,13 @@ def checkTeXPaths():
         from tempfile import mkstemp
         fd, tmpfname = mkstemp(suffix='.ltx')
         if os.name == 'nt':
+            from locale import getdefaultlocale
             from ctypes import windll, create_unicode_buffer
             GetShortPathName = windll.kernel32.GetShortPathNameW
-            longname = unicode(tmpfname)
+            language, encoding = getdefaultlocale()
+            if encoding == None:
+                encoding = 'latin1'
+            longname = unicode(tmpfname, encoding)
             shortlen = GetShortPathName(longname, 0, 0)
             shortname = create_unicode_buffer(shortlen)
             if GetShortPathName(longname, shortname, shortlen):