diff options
| author | Andrew Innes | 1999-01-29 18:13:30 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-01-29 18:13:30 +0000 |
| commit | 1f0402c393a593d4e8285ee54d1d38ab0643ce4e (patch) | |
| tree | 6dcaaaf1042908e729f838e90002c568b6afe555 | |
| parent | e7b377f0233af4f86008225bd26d54c184817086 (diff) | |
| download | emacs-1f0402c393a593d4e8285ee54d1d38ab0643ce4e.tar.gz emacs-1f0402c393a593d4e8285ee54d1d38ab0643ce4e.zip | |
(rmail-insert-inbox-text): Handle POP mailboxes
where the userid contains directory separators.
| -rw-r--r-- | lisp/mail/rmail.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 6384db9e71e..03be8dce49f 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1305,9 +1305,15 @@ It returns t if it got any new messages." | |||
| 1305 | (file-name-nondirectory buffer-file-name))) | 1305 | (file-name-nondirectory buffer-file-name))) |
| 1306 | (let (file tofile delete-files movemail popmail got-password password) | 1306 | (let (file tofile delete-files movemail popmail got-password password) |
| 1307 | (while files | 1307 | (while files |
| 1308 | (setq file (file-truename | 1308 | ;; Handle POP mailbox names specially; don't expand as filenames |
| 1309 | (expand-file-name (substitute-in-file-name (car files)))) | 1309 | ;; in case the userid contains a directory separator. |
| 1310 | tofile (expand-file-name | 1310 | (setq file (car files)) |
| 1311 | (setq popmail (string-match "^po:" file)) | ||
| 1312 | (if popmail | ||
| 1313 | (setq renamep t) | ||
| 1314 | (setq file (file-truename | ||
| 1315 | (expand-file-name (substitute-in-file-name file))))) | ||
| 1316 | (setq tofile (expand-file-name | ||
| 1311 | ;; Generate name to move to from inbox name, | 1317 | ;; Generate name to move to from inbox name, |
| 1312 | ;; in case of multiple inboxes that need moving. | 1318 | ;; in case of multiple inboxes that need moving. |
| 1313 | (concat ".newmail-" (file-name-nondirectory file)) | 1319 | (concat ".newmail-" (file-name-nondirectory file)) |
| @@ -1327,10 +1333,7 @@ It returns t if it got any new messages." | |||
| 1327 | ;;; (file-truename | 1333 | ;;; (file-truename |
| 1328 | ;;; (concat rmail-spool-directory | 1334 | ;;; (concat rmail-spool-directory |
| 1329 | ;;; (file-name-nondirectory file))))) | 1335 | ;;; (file-name-nondirectory file))))) |
| 1330 | (setq popmail (string-match "^po:" (file-name-nondirectory file))) | 1336 | (if (and movemail (not popmail)) |
| 1331 | (if popmail (setq file (file-name-nondirectory file) | ||
| 1332 | renamep t)) | ||
| 1333 | (if movemail | ||
| 1334 | (progn | 1337 | (progn |
| 1335 | ;; On some systems, /usr/spool/mail/foo is a directory | 1338 | ;; On some systems, /usr/spool/mail/foo is a directory |
| 1336 | ;; and the actual inbox is /usr/spool/mail/foo/foo. | 1339 | ;; and the actual inbox is /usr/spool/mail/foo/foo. |
| @@ -1345,7 +1348,8 @@ It returns t if it got any new messages." | |||
| 1345 | ;; cannot have "po:" in file name | 1348 | ;; cannot have "po:" in file name |
| 1346 | (setq tofile | 1349 | (setq tofile |
| 1347 | (expand-file-name | 1350 | (expand-file-name |
| 1348 | (concat ".newmail-pop-" (substring file (+ popmail 3))) | 1351 | (concat ".newmail-pop-" |
| 1352 | (file-name-nondirectory (substring file 3))) | ||
| 1349 | (file-name-directory | 1353 | (file-name-directory |
| 1350 | (expand-file-name buffer-file-name))))) | 1354 | (expand-file-name buffer-file-name))))) |
| 1351 | (message "Getting mail from post office ...")) | 1355 | (message "Getting mail from post office ...")) |