X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fnnimap.el;fp=lisp%2Fnnimap.el;h=c476be6bc8d26ab5bba260f52cb328bc9421b19d;hp=369d9d36418f24ec0664fa75f9992d29f0019529;hb=4196f8fc4237ddd8099d54fbc1f5b0bac802f2ed;hpb=441fce6b76559fdb536106a0518551c01d0e26a9 diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 369d9d364..c476be6bc 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -2086,12 +2086,15 @@ Return the server's response to the SELECT or EXAMINE command." (ranges (cdr spec))) (if (eq group 'junk) (setq junk-articles ranges) - (push (list (nnimap-send-command - "UID COPY %s %S" - (nnimap-article-ranges ranges) - (utf7-encode group t)) - ranges) - sequences)))) + ;; Don't copy if the message is already in its + ;; target group. + (unless (string= group nnimap-inbox) + (push (list (nnimap-send-command + "UID COPY %s %S" + (nnimap-article-ranges ranges) + (utf7-encode group t)) + ranges) + sequences))))) ;; Wait for the last COPY response... (when sequences (nnimap-wait-for-response (caar sequences))