Your message dated Thu, 1 May 2014 18:52:21 +0200
with message-id <20140501165221.GA28531@kronk>
and subject line Re: Bug#687607: isync: Still no recursive sync?
has caused the Debian Bug report #687607,
regarding isync: Recursive folder retrieving
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
687607: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687607
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: isync
Version: 1.0.4-2.1
Severity: wishlist
Tags: patch

There is a patch available to enable recursive folder retrieving,
http://el-tramo.be/blog/gmail-mbsync/

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (900, 'stable'), (800, 'testing'), (500, 'stable-updates')
Architecture: i386 (i586)

Kernel: Linux 2.6.32-5-486
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages isync depends on:
ii  libc6                  2.13-33           Embedded GNU C Library: Shared lib
ii  libdb4.8               4.8.30-2          Berkeley v4.8 Database Libraries [
ii  libssl0.9.8            0.9.8o-4squeeze13 SSL shared libraries

isync recommends no packages.

Versions of packages isync suggests:
ii  mutt                   1.5.20-9+squeeze2 text-based mailreader supporting M

-- no debconf information
diff -ur src/drv_imap.c src/drv_imap.c
--- src/drv_imap.c	2007-09-22 10:44:12.000000000 +0200
+++ src/drv_imap.c	2011-02-13 15:35:10.782690532 +0100
@@ -1678,7 +1678,7 @@
 	int ret;
 
 	imap->boxes = 0;
-	if ((ret = imap_exec_b( ctx, 0, "LIST \"\" \"%s%%\"", ctx->prefix )) != DRV_OK)
+	if ((ret = imap_exec_b( ctx, 0, "LIST \"\" \"%s*\"", ctx->prefix )) != DRV_OK)
 		return ret;
 	*retb = imap->boxes;
 	return DRV_OK;
diff -ur src/drv_maildir.c src/drv_maildir.c
--- src/drv_maildir.c	2008-02-23 10:02:21.000000000 +0100
+++ src/drv_maildir.c	2011-02-13 15:39:12.221440220 +0100
@@ -24,6 +24,7 @@
 
 #include "isync.h"
 
+#include <assert.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,6 +47,56 @@
 #include <db.h>
 #endif /* USE_DB */
 
+static void encode_maildir_box(const char* in, char* out, size_t size)
+{
+       const char* p;
+       char c;
+       size_t out_chars;
+
+       for (p = in, out_chars = 0; (c = *p); ++p, ++out, ++out_chars) {
+               assert(out_chars < size);
+               if (c == '/') {
+                       assert(out_chars < size - 1);
+                       *(out++) = '~';
+                       *out = '-';
+                       ++out_chars;
+               }
+               else if (c == '~') {
+                       assert(out_chars < size - 1);
+                       *(out++) = '~';
+                       *out = '~';
+                       ++out_chars;
+               }
+               else {
+                       *out = c;
+               }
+       }
+       assert(out_chars < size);
+       *out = 0;
+}
+
+static void decode_maildir_box(const char* in, char* out, size_t size)
+{
+       const char* p;
+       char c;
+       size_t out_chars;
+
+       for (p = in, out_chars = 0; (c = *p); ++p, ++out, ++out_chars) {
+               assert(out_chars < size);
+               if (c == '~') {
+                       assert(out_chars < size - 1);
+                       c = *(++p);
+                       *out = (c == '-' ? '/' : '~');
+                       ++out_chars;
+               }
+               else {
+                       *out = c;
+               }
+       }
+       assert(out_chars < size);
+       *out = 0;
+}
+
 typedef struct maildir_store_conf {
 	store_conf_t gen;
 	char *inbox;
@@ -164,14 +215,16 @@
 		const char *inbox = ((maildir_store_conf_t *)gctx->conf)->inbox;
 		int bl;
 		struct stat st;
-		char buf[PATH_MAX];
+		char buf[PATH_MAX], box[PATH_MAX];
 
 		if (*de->d_name == '.')
 			continue;
 		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, !memcmp( buf, inbox, bl - 4 ) && !inbox[bl - 4] ? "INBOX" : de->d_name );
+
+                decode_maildir_box(de->d_name, box, PATH_MAX);
+		add_string_list( retb, !memcmp( buf, inbox, bl - 4 ) && !inbox[bl - 4] ? "INBOX" : box );
 	}
 	closedir (dir);
 
@@ -717,8 +770,11 @@
 #endif /* USE_DB */
 	if (!strcmp( gctx->name, "INBOX" ))
 		gctx->path = nfstrdup( ((maildir_store_conf_t *)gctx->conf)->inbox );
-	else
-		nfasprintf( &gctx->path, "%s%s", gctx->conf->path, gctx->name );
+        else {
+               char box[_POSIX_PATH_MAX];
+               encode_maildir_box(gctx->name, box, _POSIX_PATH_MAX);
+               nfasprintf( &gctx->path, "%s%s", gctx->conf->path, box );
+        }
 	if (opts & OPEN_SETFLAGS)
 		opts |= OPEN_OLD;
 	if (opts & OPEN_EXPUNGE)
diff -ur src/drv_imap.c src/drv_imap.c
--- src/drv_imap.c	2007-09-22 10:44:12.000000000 +0200
+++ src/drv_imap.c	2011-02-13 15:35:10.782690532 +0100
@@ -1678,7 +1678,7 @@
 	int ret;
 
 	imap->boxes = 0;
-	if ((ret = imap_exec_b( ctx, 0, "LIST \"\" \"%s%%\"", ctx->prefix )) != DRV_OK)
+	if ((ret = imap_exec_b( ctx, 0, "LIST \"\" \"%s*\"", ctx->prefix )) != DRV_OK)
 		return ret;
 	*retb = imap->boxes;
 	return DRV_OK;
diff -ur src/drv_maildir.c src/drv_maildir.c
--- src/drv_maildir.c	2008-02-23 10:02:21.000000000 +0100
+++ src/drv_maildir.c	2011-02-13 15:39:12.221440220 +0100
@@ -24,6 +24,7 @@
 
 #include "isync.h"
 
+#include <assert.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,6 +47,56 @@
 #include <db.h>
 #endif /* USE_DB */
 
+static void encode_maildir_box(const char* in, char* out, size_t size)
+{
+       const char* p;
+       char c;
+       size_t out_chars;
+
+       for (p = in, out_chars = 0; (c = *p); ++p, ++out, ++out_chars) {
+               assert(out_chars < size);
+               if (c == '/') {
+                       assert(out_chars < size - 1);
+                       *(out++) = '~';
+                       *out = '-';
+                       ++out_chars;
+               }
+               else if (c == '~') {
+                       assert(out_chars < size - 1);
+                       *(out++) = '~';
+                       *out = '~';
+                       ++out_chars;
+               }
+               else {
+                       *out = c;
+               }
+       }
+       assert(out_chars < size);
+       *out = 0;
+}
+
+static void decode_maildir_box(const char* in, char* out, size_t size)
+{
+       const char* p;
+       char c;
+       size_t out_chars;
+
+       for (p = in, out_chars = 0; (c = *p); ++p, ++out, ++out_chars) {
+               assert(out_chars < size);
+               if (c == '~') {
+                       assert(out_chars < size - 1);
+                       c = *(++p);
+                       *out = (c == '-' ? '/' : '~');
+                       ++out_chars;
+               }
+               else {
+                       *out = c;
+               }
+       }
+       assert(out_chars < size);
+       *out = 0;
+}
+
 typedef struct maildir_store_conf {
 	store_conf_t gen;
 	char *inbox;
@@ -164,14 +215,16 @@
 		const char *inbox = ((maildir_store_conf_t *)gctx->conf)->inbox;
 		int bl;
 		struct stat st;
-		char buf[PATH_MAX];
+		char buf[PATH_MAX], box[PATH_MAX];
 
 		if (*de->d_name == '.')
 			continue;
 		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, !memcmp( buf, inbox, bl - 4 ) && !inbox[bl - 4] ? "INBOX" : de->d_name );
+
+                decode_maildir_box(de->d_name, box, PATH_MAX);
+		add_string_list( retb, !memcmp( buf, inbox, bl - 4 ) && !inbox[bl - 4] ? "INBOX" : box );
 	}
 	closedir (dir);
 
@@ -717,8 +770,11 @@
 #endif /* USE_DB */
 	if (!strcmp( gctx->name, "INBOX" ))
 		gctx->path = nfstrdup( ((maildir_store_conf_t *)gctx->conf)->inbox );
-	else
-		nfasprintf( &gctx->path, "%s%s", gctx->conf->path, gctx->name );
+        else {
+               char box[_POSIX_PATH_MAX];
+               encode_maildir_box(gctx->name, box, _POSIX_PATH_MAX);
+               nfasprintf( &gctx->path, "%s%s", gctx->conf->path, box );
+        }
 	if (opts & OPEN_SETFLAGS)
 		opts |= OPEN_OLD;
 	if (opts & OPEN_EXPUNGE)

--- End Message ---
--- Begin Message ---
Version: 1.1.0-1

On gio, mag 01, 2014 at 06:21:02 +0200, Johannes Rohr wrote:
> Apparently, recursive sync is now supported, when you specific "Pattern *"
> in the .mbsyncrc. Sorry for overlooking this. Maybe this should be pointed
> out explicitly in the News.Debian file.

Generally upstream changes that fix Debian bugs (like in this case), are noted
in changelog.Debian, but for the 1.1.0-1 upload I forgot to do this for this
bug (and now it's a bit too late for that).

In any case, I'm closing this manually now, since it's been fixed.

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to