mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix for bug 76447; test for nsIFilePicker::returnOK to avoid JS error when
the user has pressed cancel; r=morse, sr=blake
This commit is contained in:
parent
f28a335e3c
commit
cd461b49dc
@ -149,11 +149,12 @@
|
||||
filePicker.appendFilter(programsFilter, "*.exe; *.com");
|
||||
else
|
||||
filePicker.appendFilters(FP.filterAll);
|
||||
filePicker.show();
|
||||
var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile);
|
||||
gAppPath.value = file.path;
|
||||
gAppPath.select();
|
||||
selectAppRadio();
|
||||
if ( filePicker.show() == FP.returnOK ) {
|
||||
var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile);
|
||||
gAppPath.value = file.path;
|
||||
gAppPath.select();
|
||||
selectAppRadio();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user