]> git.lyx.org Git - features.git/commitdiff
Fix bug #7933 (lyx2lyx error while running lyxpak.py)
authorEnrico Forestieri <forenr@lyx.org>
Sat, 24 Dec 2011 11:59:33 +0000 (11:59 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 24 Dec 2011 11:59:33 +0000 (11:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40545 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/lyxpak.py
status.20x

index 696acef81d513a0c9c0fd4ea0cbabb6024f6e4d3..37829e09c2d5dfee21cf9080a8f1aea54ded64c8 100755 (executable)
@@ -285,6 +285,10 @@ def main(args):
     # Find the topmost dir common to all files
     if len(incfiles) > 1:
         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:
         topdir = os.path.dirname(incfiles[0]) + os.path.sep
 
index 8969def0c6d2b6a2285916a13fe7524a880cacba..53b80eaf4468d93389d473d15525f436679f9d96 100644 (file)
@@ -103,6 +103,9 @@ What's new
 - Fix problem with translation of theorem environments when language and
   buffer encoding differ (bug 7941).
 
+- Fix python problem with common path prefixes when exporting a LyX archive
+  (bug 7933).
+
 
 * TEX2LYX