[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[VM] yet another coding system bug: external MIME bodies
From: |
Julian Bradfield |
Subject: |
[VM] yet another coding system bug: external MIME bodies |
Date: |
Tue, 24 May 2011 20:00:08 -0000 |
User-agent: |
slrn/0.9.9p1 (Linux) |
vm-mime-retrieve-external-body may corrupt files when it retrieves
them from the external file. This seems to be rarely triggered, but it
bit me when I got some PDF files with Mac line-endings, which VM read
and converted to Unix line endings, thereby breaking all the offsets
in the PDF.
Here is the patch, which I think should apply to trunk as well:
*** vm-mime.el 2011/03/01 22:03:50 1.6
--- vm-mime.el 2011/04/15 20:28:29 1.7
***************
*** 2749,2755 ****
(if (not (file-exists-p name))
(vm-mime-error "file %s does not exist" name))
(condition-case data
! (insert-file-contents name)
(error (signal 'vm-mime-error (cdr data))))))
((and (string= access-method "url")
vm-url-retrieval-methods)
--- 2749,2755 ----
(if (not (file-exists-p name))
(vm-mime-error "file %s does not exist" name))
(condition-case data
! (insert-file-contents-literally name)
(error (signal 'vm-mime-error (cdr data))))))
((and (string= access-method "url")
vm-url-retrieval-methods)
***************
*** 2811,2817 ****
(setq name (concat "/" user "@" site ":"
name))))
(condition-case data
! (insert-file-contents name)
(error (signal 'vm-mime-error
(format "%s" (cdr data)))))))))))
--- 2811,2817 ----
(setq name (concat "/" user "@" site ":"
name))))
(condition-case data
! (insert-file-contents-literally name)
(error (signal 'vm-mime-error
(format "%s" (cdr data)))))))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [VM] yet another coding system bug: external MIME bodies,
Julian Bradfield <=