From 36488583f7ec7db2e3aac4d4487c12eef1792563 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 28 Nov 2014 18:33:31 +0100 Subject: [PATCH] unpackfs: Add a trailing '/' to the excludes. --- src/modules/unpackfs/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 2d62b07ba..1823cdac2 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -50,8 +50,9 @@ def list_excludes(destination): for line in open('/etc/mtab').readlines(): device, mount_point, _ = line.split(" ", 2) if mount_point.startswith(prefix): - # -1 to include the / at the end of the prefix - lst.extend(['--exclude', mount_point[len(prefix)-1:]]) + # -1 to include the leading / from the end of the prefix + # also add a trailing / + lst.extend(['--exclude', mount_point[len(prefix)-1:] + '/']) return lst