Re: trailing spaces in exclude-from file

Wayne Davison via rsync <[email protected]>
Newsgroups gmane.network.rsync.general
Message-ID <CAHSx_StQWOaHSFZ9uz7R3TVSjXOV87-TAyXjBkCcG+R6+CjX4g@mail.gmail.com>
On Mon, Jan 24, 2022 at 1:08 AM Jürgen Bausa via rsync <
[email protected]> wrote:

> However, it didn't work in the beginning and took me some time to find
> out, that a space at the end (e.g. "+ /mnt/Windows/Users " in the second
> line) will be interpreted and thus, the directory is assumed to be "Users "
> and not "Users".


When working on some filter rules it helps to use --debug=FILTER or
--debug=FILTER2 options. (While these are implied by -vv and -vvv
respectively, it's better to be more specific in what you want to debug.)
The FILTER2 level mentions the add_rule(RULE_HERE) call where a trailing
space would be visible prior to the trailing paren, though it might not be
immediately obvious.  I've just made a change in git that makes rsync
output a warning message in either debug-filter level if there is a
trailing space or tab on a rule, which will help someone notice it if they
didn't intend to specify it.

..wayne..

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.