From d3c08cb729461fd6e66065946251c60b223fa580 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 22 Apr 2020 10:21:59 +0200 Subject: messages: Add bug-id->log-file. --- mumi/messages.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mumi/messages.scm b/mumi/messages.scm index b6b19a3..3d38c3e 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -42,6 +42,7 @@ bugs-by-severity update-mboxes! + bug-id->log-file multipart-message? extract-attachment)) @@ -155,6 +156,14 @@ we have to do this in a very convoluted way." (define (bug-id->mbox-file bug-id) (format #f "~a/mbox/~a" (%config 'mail-dir) bug-id)) +(define* (bug-id->log-file bug-id #:key archived?) + (format #f "~a/spool/~a/~a/~a.log" + (%config 'data-dir) + (if archived? "archive" "db-h") + (string-take-right (if (string? bug-id) + bug-id + (number->string bug-id)) 2) + bug-id)) ;; This is a modified version of fetch-mbox from guile-debbugs: it ;; supports downloading with an offset. It also doesn't bother with -- cgit v1.2.3