On Sun 2008.01.13 at 12:49 -0600, Marco Peereboom wrote:
> When one tries to rename an IMAP mailbox in -current mutt the suggestion
> is a bunch of garbled characters. I have seen this for a while but keep
> forgetting to report it.
>
> Little bit of a screenshot (cut out some stuff fore brevity):
> y:Exit c:Chdir m:Mask ?:Help
>
>
> INBOX 183(35)| 1 IMAP Banana
> hackers 190| 2 IMAP Deleted Messages
> | 4 IMAP Drafts
> | 6 IMAP INBOX
> |12 IMAP Old inbox junk
> |13 IMAP OpenBSD
> |14 IMAP OpeniSCSI
> -- Mutt: Directory [imaps://mail.peereboom.us/], File mask: !^\.[^.]
> Rename mailbox OpeniSCSI to: \u008c:,,^P}????^A<!3?^A\u0088??^?
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Garbage is underscored by ^^^^
could mutt (snapshot) users try this?
Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/mutt/snapshot/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- Makefile 11 Nov 2007 10:09:43 -0000 1.45
+++ Makefile 5 Feb 2008 16:08:01 -0000
@@ -4,6 +4,7 @@ COMMENT= tty-based e-mail client, develo
VERSION= 1.5.17
DISTNAME= mutt-${VERSION}
+PKGNAME= ${DISTNAME}p0
MASTER_SITES= ${MASTER_SITES_MUTT:=devel/}
FLAVORS= idn sasl sidebar
Index: patches/patch-imap_browse_c
===================================================================
RCS file: patches/patch-imap_browse_c
diff -N patches/patch-imap_browse_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-imap_browse_c 5 Feb 2008 16:08:01 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+--- imap/browse.c.orig Mon May 28 19:19:39 2007
++++ imap/browse.c Tue Feb 5 11:08:35 2008
+@@ -298,6 +298,7 @@ int imap_mailbox_rename(const char* mailbox)
+ IMAP_MBOX mx;
+ char buf[LONG_STRING];
+ char newname[SHORT_STRING];
++ short n;
+
+ if (imap_parse_path (mailbox, &mx) < 0)
+ {
+@@ -313,7 +314,9 @@ int imap_mailbox_rename(const char* mailbox)
+ }
+
+ snprintf(buf, sizeof (buf), _("Rename mailbox %s to: "), mx.mbox);
+-
++
++ strfcpy (newname, NONULL (mx.mbox), sizeof (newname));
++
+ if (mutt_get_field (buf, newname, sizeof (newname), M_FILE) < 0)
+ goto fail;
+