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.
This commit is contained in:
parent
c6f08b8f17
commit
f485d69332
|
@ -550,6 +550,11 @@ sync_chans( main_vars_t *mvars, int ent )
|
||||||
gotchan:
|
gotchan:
|
||||||
mvars->chan = chan;
|
mvars->chan = chan;
|
||||||
if (boxp) {
|
if (boxp) {
|
||||||
|
if (!chan->patterns) {
|
||||||
|
error( "Cannot override mailbox in channel '%s' - no Patterns.\n", channame );
|
||||||
|
mvars->ret = 1;
|
||||||
|
goto gotnone;
|
||||||
|
}
|
||||||
mvars->boxlist = 1;
|
mvars->boxlist = 1;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
nboxp = strpbrk( boxp, ",\n" );
|
nboxp = strpbrk( boxp, ",\n" );
|
||||||
|
|
14
src/mbsync.1
14
src/mbsync.1
|
@ -367,10 +367,8 @@ Define the Channel \fIname\fR, opening a section for its parameters.
|
||||||
.TP
|
.TP
|
||||||
{\fBMaster\fR|\fBSlave\fR} \fB:\fIstore\fB:\fR[\fImailbox\fR]
|
{\fBMaster\fR|\fBSlave\fR} \fB:\fIstore\fB:\fR[\fImailbox\fR]
|
||||||
Specify the Master resp. Slave Store to be connected by this Channel.
|
Specify the Master resp. Slave Store to be connected by this Channel.
|
||||||
If \fImailbox\fR is omitted, \fBINBOX\fR is assumed.
|
If \fBPatterns\fR are specified, \fImailbox\fR is ignored.
|
||||||
The \fImailbox\fR specification can be overridden by \fBPatterns\fR, which
|
Otherwise, if \fImailbox\fR is omitted, \fBINBOX\fR is assumed.
|
||||||
in turn can be overridden by a mailbox list in a Channel reference (a Group
|
|
||||||
specification or the command line).
|
|
||||||
..
|
..
|
||||||
.TP
|
.TP
|
||||||
\fBPattern\fR[\fBs\fR] [\fB!\fR]\fIpattern\fR ...
|
\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
|
Note that \fBINBOX\fR is not matched by wildcards, unless it lives under
|
||||||
\fBPath\fR.
|
\fBPath\fR.
|
||||||
.br
|
.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"
|
Example: "\fBPatterns\fR\ \fI%\ !Trash\fR"
|
||||||
..
|
..
|
||||||
.TP
|
.TP
|
||||||
|
@ -524,8 +525,9 @@ with the same name on the command line.
|
||||||
One or more Channels can be specified on the same line.
|
One or more Channels can be specified on the same line.
|
||||||
.br
|
.br
|
||||||
If you supply one or more \fIbox\fRes to a \fIchannel\fR, they will be used
|
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
|
instead of what is specified in the Channel's Patterns.
|
||||||
line, except that there newlines can be used as mailbox name separators as well.
|
The same can be done on the command line, except that there newlines can be
|
||||||
|
used as mailbox name separators as well.
|
||||||
..
|
..
|
||||||
.TP
|
.TP
|
||||||
\fBChannel\fR[\fBs\fR] \fIchannel\fR[\fB:\fIbox\fR[\fB,\fR...]] ...
|
\fBChannel\fR[\fBs\fR] \fIchannel\fR[\fB:\fIbox\fR[\fB,\fR...]] ...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user