unpackfs: Add a trailing '/' to the excludes.

This commit is contained in:
Kevin Kofler 2014-11-28 18:33:31 +01:00
parent f0203a072c
commit 36488583f7

View File

@ -50,8 +50,9 @@ def list_excludes(destination):
for line in open('/etc/mtab').readlines(): for line in open('/etc/mtab').readlines():
device, mount_point, _ = line.split(" ", 2) device, mount_point, _ = line.split(" ", 2)
if mount_point.startswith(prefix): if mount_point.startswith(prefix):
# -1 to include the / at the end of the prefix # -1 to include the leading / from the end of the prefix
lst.extend(['--exclude', mount_point[len(prefix)-1:]]) # also add a trailing /
lst.extend(['--exclude', mount_point[len(prefix)-1:] + '/'])
return lst return lst