fix problem selecting imap messages after imap uid validity rolls, r/sr=sspitzer 145638

This commit is contained in:
bienvenu%netscape.com 2003-06-28 00:40:08 +00:00
Родитель 6725d1ef9c
Коммит 0f02c6b775
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -7753,7 +7753,12 @@ nsresult nsImapMockChannel::OpenCacheEntry()
if (folderSink)
folderSink->GetUidValidity(&uidValidity);
}
return cacheSession->AsyncOpenCacheEntry(urlSpec.get(), nsICache::ACCESS_READ_WRITE, this);
// stick the uid validity in front of the url, so that if the uid validity
// changes, we won't re-use the wrong cache entries.
nsCAutoString cacheKey;
cacheKey.AppendInt(uidValidity, 16);
cacheKey.Append(urlSpec);
return cacheSession->AsyncOpenCacheEntry(cacheKey.get(), nsICache::ACCESS_READ_WRITE, this);
}
nsresult nsImapMockChannel::ReadFromMemCache(nsICacheEntryDescriptor *entry)