mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #7933 (lyx2lyx error while running lyxpak.py)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40544 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d7266ac919
commit
5003431903
@ -285,6 +285,10 @@ def main(args):
|
|||||||
# Find the topmost dir common to all files
|
# Find the topmost dir common to all files
|
||||||
if len(incfiles) > 1:
|
if len(incfiles) > 1:
|
||||||
topdir = os.path.commonprefix(incfiles)
|
topdir = os.path.commonprefix(incfiles)
|
||||||
|
# Check whether topdir is valid, as os.path.commonprefix() works on
|
||||||
|
# a character by character basis, rather than on path elements.
|
||||||
|
if not os.path.exists(topdir):
|
||||||
|
topdir = os.path.dirname(topdir) + os.path.sep
|
||||||
else:
|
else:
|
||||||
topdir = os.path.dirname(incfiles[0]) + os.path.sep
|
topdir = os.path.dirname(incfiles[0]) + os.path.sep
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user