Fix for bug 13778, GetFilePrefs now accept also a native path to let users write manually their prefs

git-svn-id: svn://10.0.0.236/trunk@47587 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ducarroz%netscape.com
1999-09-15 14:51:40 +00:00
parent 6da9fa4b92
commit 34ca87f82b

View File

@@ -757,7 +757,13 @@ NS_IMETHODIMP nsPref::GetFilePref(const char *pref_name, nsIFileSpec** value)
if (result != PREF_NOERROR)
return _convertRes(result);
PRBool valid;
(*value)->SetPersistentDescriptorString(encodedString);
(*value)->IsValid(&valid);
if (! valid)
/* if the ecodedString wasn't a valid persitent descriptor, it might be a valid native path*/
(*value)->SetNativePath(encodedString);
PR_Free(encodedString); // Allocated by PREF_CopyCharPref
return NS_OK;
}