]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
Update all templates to current version. (This probably should have
[lyx.git] / lib / configure.py
index ba87cd71046a19ebd725ebc371a06055cc35302f..c14bf0b04a1ef15f9375c6a1da6635378ed4942a 100644 (file)
@@ -105,8 +105,9 @@ def checkTeXPaths():
             from ctypes import windll, create_unicode_buffer
             GetShortPathName = windll.kernel32.GetShortPathNameW
             longname = unicode(tmpfname)
-            shortname = create_unicode_buffer(len(longname)+1)
-            if GetShortPathName(longname, shortname, len(longname)+1):
+            shortlen = GetShortPathName(longname, 0, 0)
+            shortname = create_unicode_buffer(shortlen)
+            if GetShortPathName(longname, shortname, shortlen):
                 inpname = shortname.value.replace('\\', '/')
             else:
                 inpname = tmpfname.replace('\\', '/')
@@ -1304,8 +1305,6 @@ def checkTeXAllowSpaces():
         if LATEX != '':
             if os.name == 'nt' or sys.platform == 'cygwin':
                 latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """)
-                if not 'working' in latex_out:
-                    latex_out = cmdOutput(LATEX + r' "\nonstopmode\input{a b}"')
             else:
                 latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """)
         else: