From 4de9d8cacde516fc5d38c6bddffbae39505e6f6a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 22 Mar 2022 14:45:07 -0700 Subject: mdmv: ensure destination path ends with ':2,' when msg has no flags Signed-off-by: Sean Whitton --- debian/changelog | 3 +++ mdmv | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 856d0dc..63e79d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ mailscripts (0.25-1) UNRELEASED; urgency=medium * notmuch-slurp-debbug: - Exit immediately if Mail::Box::Manager::open fails. - Support tilde expansion in 'maildir' configuration key. + * mdmv: ensure destination path ends with ':2,' when message has no flags. + Previously we were writing some messages with no flags into cur/ + directories without this suffix, which is invalid (see maildir(5)). -- Sean Whitton Sun, 20 Mar 2022 14:44:31 -0700 diff --git a/mdmv b/mdmv index fa1533f..78a9222 100755 --- a/mdmv +++ b/mdmv @@ -59,7 +59,7 @@ for msg in sys.argv[1:-1]: if flags: msg_dest = os.path.join(os.path.join(dest, 'cur'), name_prefix + ':' + flags) else: - msg_dest = os.path.join(os.path.join(dest, 'cur'), name_prefix) + msg_dest = os.path.join(os.path.join(dest, 'cur'), name_prefix + ':2,') if os.path.exists(msg_dest): eprint(us + ": somehow, dest " + msg_dest + " already exists") -- cgit v1.2.3