Fix for 21956 (and workaround for 23189); r=slamm@netscape.com,danm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@57039 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
76e6ca9c80
commit
358d3ec109
@ -77,6 +77,7 @@ function save() {
|
||||
// Use stream xfer component to prompt for destination and save.
|
||||
var xfer = Components.classes[ "component://netscape/appshell/component/xfer" ].getService();
|
||||
xfer = xfer.QueryInterface( Components.interfaces.nsIStreamTransfer );
|
||||
var retry = false;
|
||||
try {
|
||||
// When Necko lands, we need to receive the real nsIChannel and
|
||||
// do SelectFileAndTransferLocation!
|
||||
@ -85,11 +86,12 @@ function save() {
|
||||
xfer.SelectFileAndTransferLocationSpec( data.location, window.opener );
|
||||
} catch( exception ) {
|
||||
// Failed (or cancelled), give them another chance.
|
||||
alert( "Save failed, rv=" + exception + "\n" );
|
||||
return;
|
||||
retry = true;
|
||||
}
|
||||
// If save underway, close this dialog.
|
||||
if ( !retry ) {
|
||||
window.setTimeout( "window.close();", 10 );
|
||||
}
|
||||
// Save underway, close this dialog.
|
||||
window.close();
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user