From: yamaoka Date: Thu, 14 Jan 1999 00:20:49 +0000 (+0000) Subject: * (nnspool-retrieve-headers): Protect against empty body. X-Git-Tag: gnus-6_10-199901141900~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aff609f31bd81636a206087fb70d55489ed0bb1;p=elisp%2Fgnus.git- * (nnspool-retrieve-headers): Protect against empty body. --- diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 6914f78..1cca067 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -137,9 +137,13 @@ there.") (setq beg (point)) (inline (nnheader-insert-head file)) (goto-char beg) - (search-forward "\n\n" nil t) - (forward-char -1) - (insert ".\n") + (if (search-forward "\n\n" nil t) + (progn (forward-char -1) + (insert ".\n")) + (goto-char (point-max)) + (if (bolp) + (insert ".\n") + (insert "\n.\n"))) (delete-region (point) (point-max))) (and do-message