On 8/19/2018 10:11 PM, just subscribed for rsync-qa from bugzilla via rsync wrote:
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:
'/?sourcedir/*a/*file2'
in the exclude patterns? (assuming a POSIX RE (not a file wildcard)).



--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to