rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(spoolFile));
rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(spoolFile));
LocateSpoolFile(nsACString & spoolPath){    PRBool isFile;    nsresult rv;    nsCOMPtr<nsILocalFile> spoolFile;    rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(spoolFile));    NS_ENSURE_SUCCESS(rv, rv);    char * mailEnv = PR_GetEnv("MAIL");    char * userEnv = PR_GetEnv("USER");    if (!userEnv)        userEnv = PR_GetEnv("USERNAME");    if (mailEnv) {        rv = spoolFile->InitWithNativePath(nsDependentCString(mailEnv));        NS_ENSURE_SUCCESS(rv, rv);        rv = spoolFile->IsFile(&isFile);        if (NS_SUCCEEDED(rv) && isFile)            spoolPath = mailEnv;    }    else if (userEnv) {        // Try to build the mailbox path from the username and a number        // of guessed spool directory paths.        nsCAutoString tmpPath;        PRUint32 i;        for (i = 0; i < NUM_DEFAULT_SPOOL_PATHS; i++) {            tmpPath = gDefaultSpoolPaths[i];            tmpPath += userEnv;            rv = spoolFile->InitWithNativePath(tmpPath);            NS_ENSURE_SUCCESS(rv, rv);            rv = spoolFile->IsFile(&isFile);            if (NS_SUCCEEDED(rv) && isFile) {                spoolPath = tmpPath;                break;            }        }    }    return rv;}