summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-03-22 14:45:07 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-03-22 14:45:07 -0700
commit4de9d8cacde516fc5d38c6bddffbae39505e6f6a (patch)
tree00a9d47c66ae8f87dd0c5eabc66e496daf22f400
parent6804b5512a2d02370d5dafdd67de3d52d1a2d6bd (diff)
downloadmailscripts-4de9d8cacde516fc5d38c6bddffbae39505e6f6a.tar.gz
mdmv: ensure destination path ends with ':2,' when msg has no flags
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog3
-rwxr-xr-xmdmv2
2 files changed, 4 insertions, 1 deletions
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 <spwhitton@spwhitton.name> 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")