Bug 418722 - Browse... button in pref window should work if pref is invalid

r=silver@warwickcompsoc.co.uk (James Ross)
a=NPOTB (ChatZilla Only)


git-svn-id: svn://10.0.0.236/trunk@251134 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gijskruitbosch%gmail.com
2008-05-03 15:41:25 +00:00
parent 45a18efb1c
commit 25013fa998

View File

@@ -1384,7 +1384,16 @@ function pwin_onPrefBrowse(button)
var rv;
if (type == "folder")
{
var current = getFileFromURLSpec(edit.value);
try
{
// if the user set the pref to an invalid folder, this will throw:
var current = getFileFromURLSpec(edit.value);
}
catch (ex)
{
// Just setting it to null will work:
current = null;
}
rv = pickGetFolder(MSG_PREFS_BROWSE_TITLE, current);
}
else