[Bug 13582] New: rsync filters containing multiple adjacent slashes aren't reduced to just one slash before matching
L A Walsh
rsync at tlinx.org
Fri Oct 12 22:32:08 UTC 2018
On 8/19/2018 10:11 PM, just subscribed for rsync-qa from bugzilla via
> The following test script shows that attempting to exclude the file
> /sourcedir/a/file2 by using //sourcedir//a//////file2 in the excluded files
> list, will silently not exclude it because of all those adjacent slashes not
> being reduced into just one /.
This is a bad example, because the leading '//' cannot be removed without
potentially changing the file's location. It's in POSIX that exactly 2
slashes should not be reduced to '1' if it is at the beginning of the path.
The ones in the middle -- yes, but even if they were fixed, the two
in front might not match a single -- because some OS's use
// to introduce a network-located system (in cygwin on windows
//remotesystem/will automatically try remotesystem).
Can your exclude use a regular expression?, can you say:
in the exclude patterns? (assuming a POSIX RE (not a file wildcard)).
More information about the rsync