Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

corruption bug in virtual folders

0 views
Skip to first unread message

Julian Bradfield

unread,
May 24, 2009, 9:02:30 AM5/24/09
to
I've run into a very nasty bug causing irreversible corruption in mail
folders.

About a month ago, I changed my XEmacs settings to make utf-8 the
all-round preferred encoding, in particular putting it at the front of
the priority list.

A few days ago, I noticed that all the non-utf-8 messages in my main
INBOX had been corrupted, in a way that looked as if they had been
decoded as utf-8. Amongst other things, this corrupted all the sums
of money involving £ signs! This process lost information, so couldn't
simply be reversed programmatically, and I had to go to system
backups.

Attempts to reproduce showed that this only happened with virtual
folders. A bit more digging revealed that when vm constructs a virtual
folder, it fails to set coding-system-for-read to binary when it reads
in the real mailboxes!

The following patch applies to my rather ancient vm (7.19-devo256),
but I've looked at the code for 8.0.12, and the bug seems to be still
there. The patch should apply to it also.

--- vm-virtual.el 2009/05/24 11:28:32 1.1
+++ vm-virtual.el 2009/05/24 11:43:13
@@ -113,12 +113,14 @@
;; set enable-local-variables to nil
;; for newer Emacses
(let ((inhibit-local-variables t)
+ (coding-system-for-read (vm-binary-coding-system))
(enable-local-eval nil)
(enable-local-variables nil))
(find-file-noselect folder)))))
(set-buffer (or (and (bufferp folder) folder)
(vm-get-file-buffer folder)
(let ((inhibit-local-variables t)
+ (coding-system-for-read (vm-binary-coding-system))
(enable-local-eval nil)
(enable-local-variables nil))
(find-file-noselect folder))))

Uday S Reddy

unread,
Nov 19, 2009, 6:35:04 AM11/19/09
to
Julian Bradfield wrote:


> The following patch applies to my rather ancient vm (7.19-devo256),
> but I've looked at the code for 8.0.12, and the bug seems to be still
> there. The patch should apply to it also.

I have now uploaded this to my version 8.1. Thanks Julian!

Cheers,
Uday

0 new messages