summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-04-07 14:21:00 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-04-07 14:21:00 +0200
commit657d60379acb2e6c478d0202371a8069a0598f7d (patch)
tree88f17e4cc3ccd32c793060c1ba722e28942d58a9
parent0b48a9147cac8e8d885f909aeec60aee753c0198 (diff)
WIP: Remove download-message.
-rw-r--r--mumi/messages.scm26
1 files changed, 0 insertions, 26 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm
index e97e80d..108275b 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -40,7 +40,6 @@
wishlist-bugs
bugs-by-severity
- download-message
multipart-message?
extract-attachment))
@@ -151,31 +150,6 @@ we have to do this in a very convoluted way."
(_ #f)))))))
-(define (download-message bug-id msg-num)
- "Download message number MSG-NUM of bug BUG-ID and store it in the
-mail directory if it's not already there. Return the name of the
-target file."
- (let ((key (list 'download-message bug-id msg-num)))
- (or (cached? key)
- (cache! key
- (let ((file-name (format #f "~a/cur/~a-~a"
- (%config 'mail-dir)
- bug-id msg-num)))
- (if (file-exists? file-name) file-name
- (begin
- (format (current-error-port)
- "downloading ~a~%" file-name)
- (call-with-values
- (lambda ()
- (fetch-mbox (%config 'debbugs)
- bug-id msg-num #:streaming? #t))
- (lambda (response port)
- (with-output-to-file file-name
- (lambda ()
- (put-bytevector (current-output-port)
- (get-bytevector-all port))))
- (close-port port)))
- file-name)))))))
;; We would like to use get-bug-log here, but it often returns
;; truncated messages. This is a known bug upstream.