Changeset 5115:8082e4c9f524 for imap/message.c
- Timestamp:
- 2007-04-10 17:40:11 (21 months ago)
- Branch:
- HEAD
- Files:
-
- 1 modified
-
imap/message.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
imap/message.c
r5112 r5115 120 120 121 121 #if USE_HCACHE 122 i map_hcache_open (idata);122 idata->hcache = imap_hcache_open (idata, NULL); 123 123 124 124 if (idata->hcache && !msgbegin) … … 848 848 static body_cache_t *msg_cache_open (IMAP_DATA *idata) 849 849 { 850 char *s;851 char *p = idata->mailbox;852 850 char mailbox[_POSIX_PATH_MAX]; 853 size_t mlen = sizeof (mailbox);854 851 855 852 if (idata->bcache) 856 853 return idata->bcache; 857 854 858 mailbox[0] = '\0'; 859 860 for (s = mailbox; p && *p && mlen; mlen--) 861 { 862 if (*p == idata->delim) 863 { 864 *s = '/'; 865 /* simple way to avoid collisions with UIDs */ 866 if (*(p + 1) >= '0' && *(p + 1) <= '9') 867 { 868 mlen--; 869 if (mlen) 870 *++s = '_'; 871 } 872 } 873 else 874 *s = *p; 875 p++; 876 s++; 877 } 878 *s = '\0'; 855 imap_cachepath (idata, idata->mailbox, mailbox, sizeof (mailbox)); 879 856 880 857 return mutt_bcache_open (&idata->conn->account, mailbox);
