return NS_ERROR_OUT_OF_MEMORY;
return NS_ERROR_FAILURE; tmp->fromFileSpec(value);
NS_IMETHODIMP nsPref::SetFilePref(const char *pref_name,                     nsIFileSpec* value, PRBool set_default)//----------------------------------------------------------------------------------------{    if (!value)        return NS_ERROR_NULL_POINTER;            nsresult rv = NS_OK;    if (!Exists(value))    {        // nsPersistentFileDescriptor requires an existing        // object. Make it first. COM makes this difficult, of course...	    nsIFileSpec* tmp;	    nsresult rv = nsComponentManager::CreateInstance(	    	"component://netscape/filespec",	    	(nsISupports*)nsnull,	    	nsIFileSpec::GetIID(),	    	(void**)&tmp);	    if (NS_FAILED(rv))	    	return rv;	    if (!tmp)	      return NS_ERROR_OUT_OF_MEMORY;        tmp->createDir();        NS_RELEASE(tmp);    }    char* encodedString = nsnull;    value->GetPersistentDescriptorString(&encodedString);    if (encodedString && *encodedString)    {        if (set_default)            rv = PREF_SetDefaultCharPref(pref_name, encodedString);        else            rv = PREF_SetCharPref(pref_name, encodedString);    }    PR_FREEIF(encodedString); // Allocated by nsOutputStringStream    return _convertRes(rv);}