fix for #51540. the key we pass to the folder cache is the persistent file

descriptor string for the .msf file for the folder.  in some cases, we
don't have a .msf file yet.  on win32 and linux, this string was null.
on the mac, bless its little heart, this was "".  so we were writing
and reading to the same cache element for all the folders, since we
were using "" as the key.  r=bienvenu
This commit is contained in:
sspitzer%netscape.com 2000-09-08 03:47:08 +00:00
parent f474ef6516
commit 7d82d84022

View File

@ -384,6 +384,10 @@ NS_IMETHODIMP nsMsgFolderCache::GetCacheElement(const char *pathKey, PRBool crea
if (!result || !pathKey) if (!result || !pathKey)
return NS_ERROR_NULL_POINTER; return NS_ERROR_NULL_POINTER;
if (nsCRT::strlen(pathKey) == 0) {
return NS_ERROR_FAILURE;
}
nsCStringKey hashKey(pathKey); nsCStringKey hashKey(pathKey);
*result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey); *result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey);