summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-12-24 02:49:41 +0000
committerRichard M. Stallman <rms@gnu.org>1993-12-24 02:49:41 +0000
commit660a52f9c9cab18c9b2d197176cd43c9f5a62c2d (patch)
tree47e7680da5763976efab73bbb02e0129a6959bb0 /lisp
parent1f6fcec334685c8449a56a053fe8d43d4794478c (diff)
downloademacs-660a52f9c9cab18c9b2d197176cd43c9f5a62c2d.tar.gz
(rmail-insert-inbox-text): If copy-file fails,
call rename-file with t as third arg.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/rmail.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index bbbe818ca7d..2ea8b6b27f1 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -778,7 +778,8 @@ argument causes us to read a file name and use that file as the inbox."
(condition-case nil
(copy-file file tofile nil)
(error
- (rename-file file tofile nil)))
+ ;; Third arg is t so we can replace existing file TOFILE.
+ (rename-file file tofile t)))
;; Make the real inbox file empty.
;; Leaving it deleted could cause lossage
;; because mailers often won't create the file.