mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
fix 57806, multiple filter logs for pop mail filtering logging, sr=mscott
This commit is contained in:
parent
4d2dbcae97
commit
298bf51eff
@ -50,6 +50,7 @@
|
||||
#include "nsIPref.h"
|
||||
#include "nsIRDFService.h"
|
||||
#include "nsMsgI18N.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
|
||||
@ -1634,8 +1635,16 @@ nsOutputFileStream * nsParseNewMailState::GetLogFile ()
|
||||
// This log file is used by regular filters and JS filters
|
||||
if (m_logFile == nsnull)
|
||||
{
|
||||
// ### TODO file spec sub-class for log file
|
||||
nsFileSpec logFile("filter.log");
|
||||
nsCOMPtr<nsIFile> logDir;
|
||||
NS_GetSpecialDirectory(NS_APP_MAIL_50_DIR, getter_AddRefs(logDir));
|
||||
|
||||
nsXPIDLCString pathBuf;
|
||||
logDir->Append("filter.log");
|
||||
nsresult rv = logDir->GetPath(getter_Copies(pathBuf));
|
||||
if (NS_FAILED(rv)) return nsnull;
|
||||
nsCOMPtr<nsIFileSpec> outSpec;
|
||||
|
||||
nsFileSpec logFile(pathBuf);
|
||||
m_logFile = new nsOutputFileStream(logFile, PR_WRONLY | PR_CREATE_FILE, 00600);
|
||||
}
|
||||
return m_logFile;
|
||||
|
Loading…
Reference in New Issue
Block a user