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
This commit is contained in:
Enrico Forestieri 2011-02-06 18:35:27 +00:00
parent 32d11e0bf8
commit bf6c45dd09

View File

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