From 3d5eb87bdf5edafdac02976a6b4ca2f6666d214c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 10 May 2022 11:07:52 +0200 Subject: mail bug fix missing variable --- bin/tagmail | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tagmail b/bin/tagmail index 641706f..d846d73 100755 --- a/bin/tagmail +++ b/bin/tagmail @@ -58,13 +58,13 @@ LD_LIBRARY_PATH=$HOME/.guix-profile/lib exec guile -e main -s "$0" "$@" (define (move-file uidvalidity target-folder) (lambda (file) (let* ((target-file (new-path (rename-higher file uidvalidity) target-folder)) - (sub-len (string-prefix-length file target-file))) + (sub-len (string-prefix-length file target-file)) + (do? (not (option-ref options 'dry-run #f)))) (simple-format #t " [~a] ~a -> ~a~%" (colorize-string "mv" 'BOLD (if do? 'RED 'NONE)) (substring file sub-len) (substring target-file sub-len)) - (unless (option-ref options 'dry-run #f) - (rename-file file target-file))))) + (when do? (rename-file file target-file))))) (let* ((mail-repo (assq-ref options 'mail-repo)) (target-folder (format #f "~a~a/~a" mail-repo account end-dir)) -- cgit v1.2.3