From 5ce8c19837293c4e6f9bbca9c6286d40915b7ca0 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Tue, 28 Aug 2001 01:57:20 +0000 Subject: [PATCH] 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 git-svn-id: svn://10.0.0.236/trunk@101868 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileMac.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/xpcom/io/nsLocalFileMac.cpp b/mozilla/xpcom/io/nsLocalFileMac.cpp index 32407886978..ec209b85415 100644 --- a/mozilla/xpcom/io/nsLocalFileMac.cpp +++ b/mozilla/xpcom/io/nsLocalFileMac.cpp @@ -677,7 +677,7 @@ static OSErr ResolvePathAndSpec(const char * filePath, FSSpec *inSpec, PRBool cr else if ((err == fnfErr) && createDirs) { // 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); // For some reason, this usually returns fnfErr, even though it works. if (err == fnfErr) @@ -2319,7 +2319,7 @@ nsLocalFile::SetPersistentDescriptor(const char * aPersistentDescriptor) { NS_ENSURE_ARG(aPersistentDescriptor); - nsresult rv; + nsresult rv = NS_OK; PRUint32 dataSize = nsCRT::strlen(aPersistentDescriptor); char* decodedData = PL_Base64Decode((const char*)aPersistentDescriptor, dataSize, nsnull); @@ -2336,7 +2336,7 @@ nsLocalFile::SetPersistentDescriptor(const char * aPersistentDescriptor) err = ::ResolveAlias(nsnull, aliasH, &resolvedSpec, &changed); if (err == fnfErr) // resolvedSpec is valid in this case err = noErr; - rv = MacErrorMapper(err); + rv = MacErrorMapper(err); DisposeHandle((Handle) aliasH); NS_ENSURE_SUCCESS(rv, rv);