From: Enrico Forestieri Date: Sun, 6 Feb 2011 18:35:27 +0000 (+0000) Subject: Protect against multiple occurrences of the common prefix. X-Git-Tag: 2.0.0~858 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bf6c45dd09a82722b6b37d53bcd21a30e6f27370;p=features.git Protect against multiple occurrences of the common prefix. 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 --- diff --git a/lib/scripts/lyxpak.py b/lib/scripts/lyxpak.py index bd04273073..458d4fbac6 100755 --- a/lib/scripts/lyxpak.py +++ b/lib/scripts/lyxpak.py @@ -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