]> git.lyx.org Git - features.git/commitdiff
Protect against multiple occurrences of the common prefix.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 6 Feb 2011 18:35:27 +0000 (18:35 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 6 Feb 2011 18:35:27 +0000 (18:35 +0000)
For example, if the common prefix is only the root '/'.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37516 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/lyxpak.py

index bd0427307323a19aed51789bf68e95f478c23b7e..458d4fbac6a06ab78dfaca994215dc5230bb32ba 100755 (executable)
@@ -253,7 +253,7 @@ def main(argv):
     # Remove the prefix common to all paths in the list
     i = 0
     while i < len(incfiles):
-        incfiles[i] = string.replace(incfiles[i], topdir, '')
+        incfiles[i] = string.replace(incfiles[i], topdir, '', 1)
         i += 1
 
     # Remove duplicates and sort the list