From bf6c45dd09a82722b6b37d53bcd21a30e6f27370 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 6 Feb 2011 18:35:27 +0000 Subject: [PATCH] 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 --- lib/scripts/lyxpak.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2