Bug 62110 - initialize rv in nsLocalFile::SetPersistentDescriptor. Fixes multiple folders bug in mail on Mac OS X, and probably other bugs as well. r=pinkerton, sr=mscott, a=dbaron
This commit is contained in:
@@ -677,7 +677,7 @@ static OSErr ResolvePathAndSpec(const char * filePath, FSSpec *inSpec, PRBool cr
|
|||||||
else if ((err == fnfErr) && createDirs)
|
else if ((err == fnfErr) && createDirs)
|
||||||
{
|
{
|
||||||
// If we got "file not found" and we're allowed to create directories
|
// If we got "file not found" and we're allowed to create directories
|
||||||
// then we need to create aone
|
// then we need to create one
|
||||||
err = ::FSpDirCreate(outSpec, smCurrentScript, &outSpec->parID);
|
err = ::FSpDirCreate(outSpec, smCurrentScript, &outSpec->parID);
|
||||||
// For some reason, this usually returns fnfErr, even though it works.
|
// For some reason, this usually returns fnfErr, even though it works.
|
||||||
if (err == fnfErr)
|
if (err == fnfErr)
|
||||||
@@ -2319,7 +2319,7 @@ nsLocalFile::SetPersistentDescriptor(const char * aPersistentDescriptor)
|
|||||||
{
|
{
|
||||||
NS_ENSURE_ARG(aPersistentDescriptor);
|
NS_ENSURE_ARG(aPersistentDescriptor);
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
PRUint32 dataSize = nsCRT::strlen(aPersistentDescriptor);
|
PRUint32 dataSize = nsCRT::strlen(aPersistentDescriptor);
|
||||||
char* decodedData = PL_Base64Decode((const char*)aPersistentDescriptor, dataSize, nsnull);
|
char* decodedData = PL_Base64Decode((const char*)aPersistentDescriptor, dataSize, nsnull);
|
||||||
|
|||||||
Reference in New Issue
Block a user