Show
Ignore:
Timestamp:
1999-09-06 23:53:08 (9 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

* 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@…>)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • complete.c

    r1169 r1277  
    5252  { 
    5353    if (s[1]) 
    54       snprintf (imap_path, sizeof(imap_path), "%s/%s", NONULL(Maildir), 
    55                 s+1); 
     54    { 
     55      /* don't append '/' if Maildir is {host} only */ 
     56      if (mx_is_imap (NONULL (Maildir)) && Maildir[strlen (Maildir)-1] == '}') 
     57        snprintf (imap_path, sizeof (imap_path), "%s%s", Maildir, s+1); 
     58      else 
     59        snprintf (imap_path, sizeof (imap_path), "%s/%s", NONULL (Maildir), 
     60          s+1); 
     61    } 
    5662    else 
    5763      strfcpy (imap_path, NONULL(Maildir), sizeof(imap_path)); 
    5864  } 
    5965  else 
    60   { 
    6166    strfcpy (imap_path, s, sizeof(imap_path)); 
    62   } 
    6367 
    6468  if (mx_is_imap (imap_path)) 
    65   { 
    6669    return imap_complete (s, slen, imap_path); 
    67   } 
    6870#endif 
    6971