commit 43f23fb1808acdfe5fe229cf9eb689324069e3dc
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Nov 18 13:17:31 2006 +0000
backport: reverse-map <Inbox> to INBOX when encountered during listing.
src/drv_maildir.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index f65f213..f433f6a 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -161,15 +161,17 @@ maildir_list( store_t *gctx, string_list_t **retb )
}
*retb = 0;
while ((de = readdir( dir ))) {
+ const char *inbox = ((maildir_store_conf_t *)gctx->conf)->inbox;
+ int bl;
struct stat st;
char buf[PATH_MAX];
if (*de->d_name == '.')
continue;
- nfsnprintf( buf, sizeof(buf), "%s%s/cur", gctx->conf->path,
de->d_name );
+ bl = nfsnprintf( buf, sizeof(buf), "%s%s/cur",
gctx->conf->path, de->d_name );
if (stat( buf, &st ) || !S_ISDIR(st.st_mode))
continue;
- add_string_list( retb, de->d_name );
+ add_string_list( retb, !memcmp( buf, inbox, bl - 4 ) &&
!inbox[bl - 4] ? "INBOX" : de->d_name );
}
closedir (dir);
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel