diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 10:32:59 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 10:32:59 +0200 |
commit | 9f66dbc6231e2a884f76fa9913a0461887476116 (patch) | |
tree | 63992a4f6541c63691ebca03f0eedc62e54d9ebb | |
parent | 31ae7f845ece229367322020becbf6db4c804a54 (diff) |
messages: download-message: Reset mtime.
-rw-r--r-- | mumi/messages.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm index 63f68df..805a518 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -174,7 +174,22 @@ target file." (lambda () (put-bytevector (current-output-port) (get-bytevector-all port)))) - (close-port port))) + (close-port port) + + ;; Reset mtime, because mu uses it! + (with-input-from-file file-name + (lambda () + (match (mbox->emails (current-input-port)) + ((email) + (let* ((mail (parse-email email)) + (seconds + (time-second + (date->time-monotonic + (date mail))))) + (utime file-name + seconds + seconds))) + (_ #f)))))) file-name))))))) ;; We would like to use get-bug-log here, but it often returns |