diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-04-22 10:43:34 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-22 10:43:34 +0200 |
commit | 309b03b8177672b5f3718914c2200ec0fffc2f6c (patch) | |
tree | bac19a45df51eb0a011f4ae5d706d5172e9ab492 | |
parent | f7f1cbd4aec0ab748c64e417c1dbd28e35556cb0 (diff) |
messages: Remove download-mbox.
-rw-r--r-- | mumi/messages.scm | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm index d93cefd..3b34237 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -194,39 +194,6 @@ symbol 'email)." '())))) (http-get uri #:decode-body? #f #:headers headers))) -(define* (download-mbox bug-id) - "Download the mbox of bug BUG-ID and store it in the mail directory -if it's not already there. If the file already exists only download -the difference by providing the current file size as an offset." - (let* ((file-name (bug-id->mbox-file bug-id)) - (offset (and (file-exists? file-name) - (stat:size (stat file-name)))) - (mtime (and (file-exists? file-name) - (stat:mtime (stat file-name))))) - (format (current-error-port) - "downloading ~a~%" file-name) - (call-with-values - (lambda () - (fetch-mbox* (%config 'debbugs) - bug-id - ;; TODO: This doesn't work when - ;; using Guile's web client, but - ;; it works with wget. #:offset - ;; offset - #:mdate - (and mtime - (time-monotonic->date - (make-time time-monotonic 0 mtime))))) - (lambda (response body) - (if body - (begin - ;; TODO: append when using offset - (with-output-to-file file-name - (lambda () - (put-bytevector (current-output-port) body))) - file-name) - #f))))) - ;; We would like to use get-bug-log here, but it often returns ;; truncated messages. This is a known bug upstream. (define-public (patch-messages bug-id) |