diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-09-07 06:53:08 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-09-07 06:53:08 +0000 |
commit | 458307e72af511d2fad7961fdd180f02b9f77256 (patch) | |
tree | 5ea94d8f9a3790829f107aef4b7ee56ddf9b3fd1 /muttlib.c | |
parent | f7e524f1a7100545042241e68f83099a07c30086 (diff) |
* redoes the folder update optimisation I did yesterday. It's somewhat
cleaner and less invasive, and I'm not so worried about memory leaks
now.
* Fixes the bug where mutt would append a '/' to $folder even if it
was only {mailhost}, causing mutt to browse the root directory
instead of the home directory.
* includes a first stab at preserving the D flag on the IMAP server.
Now if you answer no to 'Purge deleted', the server still stores
the messages as deleted, but doesn't expunge them on exit.
NOTE: this is a first attempt. Play around, but don't mark things
as deleted that you'd be sorry to see disappear.
(From: Brendan Cully <brendan@kublai.com>)
Diffstat (limited to 'muttlib.c')
-rw-r--r-- | muttlib.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -159,9 +159,6 @@ void mutt_free_header (HEADER **h) #ifdef MIXMASTER mutt_free_list (&(*h)->chain); #endif -#ifdef USE_IMAP - mutt_free_list (&(*h)->server_flags); -#endif safe_free ((void **) h); } @@ -229,7 +226,15 @@ char *mutt_expand_path (char *s, size_t slen) } } else if (*s == '=' || *s == '+') + { +#ifdef USE_IMAP + /* special case: folder = {host}: don't append slash */ + if (mx_is_imap (NONULL (Maildir)) && Maildir[strlen (Maildir) - 1] == '}') + snprintf (p, sizeof (p), "%s%s", NONULL (Maildir), s + 1); + else +#endif snprintf (p, sizeof (p), "%s/%s", NONULL (Maildir), s + 1); + } else if (*s == '@') { /* elm compatibility, @ expands alias to user name */ @@ -912,4 +917,3 @@ int state_printf(STATE *s, const char *fmt, ...) return rv; } - |