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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user