Browse Source

refuse box list overrides if Channel has no Patterns

as the named boxes are the same on both sides, they logically make
sense only when the channel is in that mode anyway, which is the case
when using patterns.
wip/maildir-uid-dupes-test
Oswald Buddenhagen 11 years ago
parent
commit
f485d69332
  1. 5
      src/main.c
  2. 14
      src/mbsync.1

5
src/main.c

@ -550,6 +550,11 @@ sync_chans( main_vars_t *mvars, int ent )
gotchan:
mvars->chan = chan;
if (boxp) {
if (!chan->patterns) {
error( "Cannot override mailbox in channel '%s' - no Patterns.\n", channame );
mvars->ret = 1;
goto gotnone;
}
mvars->boxlist = 1;
for (;;) {
nboxp = strpbrk( boxp, ",\n" );

14
src/mbsync.1

@ -367,10 +367,8 @@ Define the Channel \fIname\fR, opening a section for its parameters.
.TP
{\fBMaster\fR|\fBSlave\fR} \fB:\fIstore\fB:\fR[\fImailbox\fR]
Specify the Master resp. Slave Store to be connected by this Channel.
If \fImailbox\fR is omitted, \fBINBOX\fR is assumed.
The \fImailbox\fR specification can be overridden by \fBPatterns\fR, which
in turn can be overridden by a mailbox list in a Channel reference (a Group
specification or the command line).
If \fBPatterns\fR are specified, \fImailbox\fR is ignored.
Otherwise, if \fImailbox\fR is omitted, \fBINBOX\fR is assumed.
..
.TP
\fBPattern\fR[\fBs\fR] [\fB!\fR]\fIpattern\fR ...
@ -385,6 +383,9 @@ times); later matches take precedence.
Note that \fBINBOX\fR is not matched by wildcards, unless it lives under
\fBPath\fR.
.br
The mailbox list selected by \fBPatterns\fR can be overridden by a mailbox
list in a channel reference (a \fBGroup\fR specification or the command line).
.br
Example: "\fBPatterns\fR\ \fI%\ !Trash\fR"
..
.TP
@ -524,8 +525,9 @@ with the same name on the command line.
One or more Channels can be specified on the same line.
.br
If you supply one or more \fIbox\fRes to a \fIchannel\fR, they will be used
instead of what is specified in the Channel. The same can be done on the command
line, except that there newlines can be used as mailbox name separators as well.
instead of what is specified in the Channel's Patterns.
The same can be done on the command line, except that there newlines can be
used as mailbox name separators as well.
..
.TP
\fBChannel\fR[\fBs\fR] \fIchannel\fR[\fB:\fIbox\fR[\fB,\fR...]] ...

Loading…
Cancel
Save