aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/tagmail6
1 files 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))