From f75a667d4e5c2dc06fbaf84eb6e76efc262cdf7c Mon Sep 17 00:00:00 2001 From: Adam W Date: Thu, 24 Nov 2011 00:12:57 +0000 Subject: [PATCH] mail-source.el (mail-source-fetch-maildir): Don't expect the return value of `delete-file', that returns nil for a local file but returns t for a remote file using ssh. --- lisp/ChangeLog | 6 ++++++ lisp/mail-source.el | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 488ede01d..001d657de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-11-24 Adam W (tiny change) + + * mail-source.el (mail-source-fetch-maildir): Don't expect the return + value of `delete-file', that returns nil for a local file but returns t + for a remote file using ssh. + 2011-11-22 Paul Eggert * gnus-sum.el (gnus-summary-save-article): Spelling fix. diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 6e6ef76c0..2315cff62 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -1017,6 +1017,7 @@ This only works when `display-time' is enabled." (dolist (file (directory-files (concat path subdir) t)) (when (and (not (file-directory-p file)) (not (if function + ;; `function' should return nil if successful. (funcall function file mail-source-crash-box) (let ((coding-system-for-write mm-text-coding-system) @@ -1035,7 +1036,8 @@ This only works when `display-time' is enabled." ;;; (insert "\n\n") ;; MMDF mail format (insert "\001\001\001\001\n")) - (delete-file file))))) + (delete-file file) + nil)))) (incf found (mail-source-callback callback file)) (mail-source-delete-crash-box))))) found))) -- 2.34.1