[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 387af85: Handle updates flags when setting flags
From: |
Philip Kaludercic |
Subject: |
master 387af85: Handle updates flags when setting flags |
Date: |
Thu, 23 Sep 2021 14:55:02 -0400 (EDT) |
branch: master
commit 387af85c4d51dd98267f296bc91cf22d7ecc5374
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Handle updates flags when setting flags
* nnmaildir.el (nnmaildir--article-set-flags): Handle updated flags
more gracefully
---
lisp/gnus/nnmaildir.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index 171f081..690761a 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -194,7 +194,15 @@ This variable is set by `nnmaildir-request-article'.")
(article-file (concat curdir prefix suffix))
(new-name (concat curdir prefix new-suffix)))
(unless (file-exists-p article-file)
- (error "Couldn't find article file %s" article-file))
+ (let ((possible (file-expand-wildcards (concat curdir prefix "*"))))
+ (cond ((length= possible 1)
+ (unless (string-match-p "\\`\\(.+\\):2,.*?\\'" (car possible))
+ (error "Couldn't find updated article file %s" article-file))
+ (setq article-file (car possible)))
+ ((length> possible 1)
+ (error "Couldn't determine exact article file %s" article-file))
+ ((null possible)
+ (error "Couldn't find article file %s" article-file)))))
(rename-file article-file new-name 'replace)
(setf (nnmaildir--art-suffix article) new-suffix)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 387af85: Handle updates flags when setting flags,
Philip Kaludercic <=