diff options
| author | Roland McGrath | 1992-09-18 07:30:25 +0000 |
|---|---|---|
| committer | Roland McGrath | 1992-09-18 07:30:25 +0000 |
| commit | 1844ea6b76d4af7eb7ab65a938f974235b738800 (patch) | |
| tree | 3dfe77dfe002dd93d95d566abbe35ac35b6e1bc2 | |
| parent | 1a8c3f100ab303d03ca03e582a16f7c1c8e5ed75 (diff) | |
| download | emacs-1844ea6b76d4af7eb7ab65a938f974235b738800.tar.gz emacs-1844ea6b76d4af7eb7ab65a938f974235b738800.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/mail/rmail.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 47fc2f3abfa..683562db18b 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -528,7 +528,19 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 528 | ;; Delete the old files, now that babyl file is saved. | 528 | ;; Delete the old files, now that babyl file is saved. |
| 529 | (while delete-files | 529 | (while delete-files |
| 530 | (condition-case () | 530 | (condition-case () |
| 531 | (delete-file (car delete-files)) | 531 | (if (or (string= (file-name-directory (car delete-files)) |
| 532 | rmail-spool-directory) | ||
| 533 | (string-match "^\\.newmail-" | ||
| 534 | (file-name-nondirectory (car delete-files)))) | ||
| 535 | ;; If the file's in the spool directory, try deleting. | ||
| 536 | ;; Likewise if made with movemail. | ||
| 537 | (condition-case () | ||
| 538 | (delete-file (car delete-files)) | ||
| 539 | (file-error | ||
| 540 | ;; If we can't delete it, truncate it. | ||
| 541 | (write-region (point) (point) (car delete-files)))) | ||
| 542 | ;; If not in the spool dir, just truncate it. | ||
| 543 | (write-region (point) (point) (car delete-files))) | ||
| 532 | (file-error nil)) | 544 | (file-error nil)) |
| 533 | (setq delete-files (cdr delete-files))))) | 545 | (setq delete-files (cdr delete-files))))) |
| 534 | (if (= new-messages 0) | 546 | (if (= new-messages 0) |
| @@ -573,7 +585,10 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 573 | (if (file-directory-p file) | 585 | (if (file-directory-p file) |
| 574 | (setq file (expand-file-name (user-original-login-name) | 586 | (setq file (expand-file-name (user-original-login-name) |
| 575 | file))))) | 587 | file))))) |
| 576 | (if (or (file-exists-p tofile) (file-exists-p file)) | 588 | (if (or (and (file-exists-p tofile) |
| 589 | (/= 0 (nth 7 (file-attributes tofile)))) | ||
| 590 | (and (file-exists-p file) | ||
| 591 | (/= 0 (nth 7 (file-attributes file))))) | ||
| 577 | (message "Getting mail from %s..." file)) | 592 | (message "Getting mail from %s..." file)) |
| 578 | ;; Set TOFILE if have not already done so, and | 593 | ;; Set TOFILE if have not already done so, and |
| 579 | ;; rename or copy the file FILE to TOFILE if and as appropriate. | 594 | ;; rename or copy the file FILE to TOFILE if and as appropriate. |