commit 003ddb219947cd2a358843d67ba3aa501660ccba
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Oct 4 13:12:50 2014 +0200
permit IMAP Stores with explicitly empty Path
this is useful if the server sends an unhelpful NAMESPACE like
"INBOX." (which precludes clean use of Patterns with the real INBOX).
src/drv_imap.c | 8 ++++----
src/mbsync.1 | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 113d608..70118e2 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1742,7 +1742,7 @@ imap_open_store_namespace( imap_store_t *ctx )
ctx->prefix = cfg->gen.path;
ctx->delimiter = cfg->delimiter ? nfstrdup( cfg->delimiter ) : 0;
- if (((!*ctx->prefix && cfg->use_namespace) || !cfg->delimiter) &&
CAP(NAMESPACE)) {
+ if (((!ctx->prefix && cfg->use_namespace) || !cfg->delimiter) &&
CAP(NAMESPACE)) {
/* get NAMESPACE info */
if (!ctx->got_namespace)
imap_exec( ctx, 0, imap_open_store_namespace_p2,
"NAMESPACE" );
@@ -1776,7 +1776,7 @@ imap_open_store_namespace2( imap_store_t *ctx )
is_atom( (nsp_1st_ns = nsp_1st->child) ) &&
is_atom( (nsp_1st_dl = nsp_1st_ns->next) ))
{
- if (!*ctx->prefix && cfg->use_namespace)
+ if (!ctx->prefix && cfg->use_namespace)
ctx->prefix = nsp_1st_ns->val;
if (!ctx->delimiter)
ctx->delimiter = nfstrdup( nsp_1st_dl->val );
@@ -1790,6 +1790,8 @@ static void
imap_open_store_finalize( imap_store_t *ctx )
{
set_bad_callback( &ctx->gen, 0, 0 );
+ if (!ctx->prefix)
+ ctx->prefix = "";
ctx->trashnc = TrashUnknown;
ctx->callbacks.imap_open( &ctx->gen, ctx->callback_aux );
}
@@ -2381,8 +2383,6 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep )
error( "%s '%s' has both Account and account-specific
options\n", type, name );
cfg->err = 1;
}
- if (!store->gen.path)
- store->gen.path = "";
}
return 1;
}
diff --git a/src/mbsync.1 b/src/mbsync.1
index 020b6f8..2af9178 100644
--- a/src/mbsync.1
+++ b/src/mbsync.1
@@ -133,7 +133,7 @@ but is not considered part of them; this is important for
\fBPatterns\fR
in the Channels section.
Note that you \fBmust\fR append a slash if you want to specify an entire
directory.
-(Default: \fI""\fR)
+(Default: none)
..
.TP
\fBMaxSize\fR \fIsize\fR[\fBk\fR|\fBm\fR][\fBb\fR]
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel