mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Query about the exact length of a short name, as it may happen that
a short name length is actually greater than the long name length. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38908 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ef51dbff8e
commit
bd9d3cb0eb
@ -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('\\', '/')
|
||||
|
Loading…
Reference in New Issue
Block a user