CVS commit by ossi:
backport: reverse-map <Inbox> to INBOX when encountered during listing.
M +4 -2 drv_maildir.c 1.8.2.4
--- isync/src/drv_maildir.c #1.8.2.3:1.8.2.4
@@ -162,4 +162,6 @@ maildir_list( store_t *gctx, string_list
*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];
@@ -167,8 +169,8 @@ maildir_list( store_t *gctx, string_list
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);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel