mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
On Windows, avoid spaces in filenames passed to latex by using the
short form of the path. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38894 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7920909ca5
commit
226b29943f
@ -102,7 +102,14 @@ def checkTeXPaths():
|
||||
from tempfile import mkstemp
|
||||
fd, tmpfname = mkstemp(suffix='.ltx')
|
||||
if os.name == 'nt':
|
||||
inpname = tmpfname.replace('\\', '/')
|
||||
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):
|
||||
inpname = shortname.value.replace('\\', '/')
|
||||
else:
|
||||
inpname = tmpfname.replace('\\', '/')
|
||||
else:
|
||||
inpname = cmdOutput('cygpath -m ' + tmpfname)
|
||||
logname = os.path.basename(inpname.replace('.ltx', '.log'))
|
||||
|
Loading…
Reference in New Issue
Block a user