From 7d82d840224e2c0742fac89e29c6b2f2b83b210f Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Fri, 8 Sep 2000 03:47:08 +0000 Subject: [PATCH] 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 --- mailnews/base/src/nsMsgFolderCache.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailnews/base/src/nsMsgFolderCache.cpp b/mailnews/base/src/nsMsgFolderCache.cpp index 9a57f2459333..b3674f177b90 100644 --- a/mailnews/base/src/nsMsgFolderCache.cpp +++ b/mailnews/base/src/nsMsgFolderCache.cpp @@ -383,7 +383,11 @@ NS_IMETHODIMP nsMsgFolderCache::GetCacheElement(const char *pathKey, PRBool crea if (!result || !pathKey) return NS_ERROR_NULL_POINTER; - + + if (nsCRT::strlen(pathKey) == 0) { + return NS_ERROR_FAILURE; + } + nsCStringKey hashKey(pathKey); *result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey);