]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/lyxpak.py
configure.py: Replace 'ltx' by 'log' case insensitively
[lyx.git] / lib / scripts / lyxpak.py
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