Empty paths shouldn't match during drecurse, but there's no point in
including them.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
\--exclude-from=*filename*
: read --exclude paths from *filename*, one path per-line (may be
- repeated).
+ repeated). Ignore completely empty lines.
\--exclude-rx=*pattern*
: exclude any path matching *pattern*. See `bup-index`(1) for
\--exclude-from=*filename*
: read --exclude paths from *filename*, one path per-line (may be
- repeated).
+ repeated). Ignore completely empty lines.
\--exclude-rx=*pattern*
: exclude any path matching *pattern*, which must be a Python regular
except IOError, e:
raise fatal("couldn't read %s" % parameter)
for exclude_path in f.readlines():
- excluded_paths.append(realpath(exclude_path.strip()))
+ # FIXME: perhaps this should be rstrip('\n')
+ exclude_path = realpath(exclude_path.strip())
+ if exclude_path:
+ excluded_paths.append(exclude_path)
return sorted(frozenset(excluded_paths))