From 5170c9cbebb94c12aa4f61927736c6b3dfb50019 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 23 Feb 1994 00:29:43 +0000 Subject: [PATCH] (rmail-insert-inbox-text): Recognize the spool directory even if symlinks are present. --- lisp/mail/rmail.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 5ce007ef8f6..386d40e91de 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -751,7 +751,8 @@ argument causes us to read a file name and use that file as the inbox." (defun rmail-insert-inbox-text (files renamep) (let (file tofile delete-files movemail popmail) (while files - (setq file (expand-file-name (substitute-in-file-name (car files))) + (setq file (file-truename + (expand-file-name (substitute-in-file-name (car files)))) ;;>> un*x specific << ;; The "+" used to be "~", which is an extremely poor choice; ;; it might accidentally be deleted when space is low @@ -760,7 +761,8 @@ argument causes us to read a file name and use that file as the inbox." ;; If getting from mail spool directory, ;; use movemail to move rather than just renaming, ;; so as to interlock with the mailer. - (setq movemail (equal (file-name-directory file) rmail-spool-directory) + (setq movemail (string= (file-name-directory file) + (file-truename rmail-spool-directory)) popmail (string-match "^po:" (file-name-nondirectory file))) (if popmail (setq file (file-name-nondirectory file) renamep t)) -- 2.11.4.GIT