diff options
| author | Richard M. Stallman | 1993-07-13 05:52:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-07-13 05:52:32 +0000 |
| commit | 019bf2a31326fea9e78685df10cfa36dcee2c609 (patch) | |
| tree | 8f703b7d0e698c8a96acdae9c682a85df3515435 | |
| parent | 626f67f354cb56ef2bd6702af7bddbaedb6600b4 (diff) | |
| download | emacs-019bf2a31326fea9e78685df10cfa36dcee2c609.tar.gz emacs-019bf2a31326fea9e78685df10cfa36dcee2c609.zip | |
(rmail-insert-inbox-text): If inbox is not in the
spool dir, try copying before renaming.
| -rw-r--r-- | lisp/mail/rmail.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index ad99396a45c..a4ee62c3ad6 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -753,7 +753,12 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 753 | (not (file-exists-p file)))) | 753 | (not (file-exists-p file)))) |
| 754 | nil) | 754 | nil) |
| 755 | ((and (not movemail) (not popmail)) | 755 | ((and (not movemail) (not popmail)) |
| 756 | (rename-file file tofile nil) | 756 | ;; Try copying. If that fails (perhaps no space), |
| 757 | ;; rename instead. | ||
| 758 | (condition-case nil | ||
| 759 | (copy-file file tofile nil) | ||
| 760 | (error | ||
| 761 | (rename-file file tofile nil))) | ||
| 757 | ;; Make the real inbox file empty. | 762 | ;; Make the real inbox file empty. |
| 758 | ;; Leaving it deleted could cause lossage | 763 | ;; Leaving it deleted could cause lossage |
| 759 | ;; because mailers often won't create the file. | 764 | ;; because mailers often won't create the file. |