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:
law%netscape.com 2000-01-07 00:00:41 +00:00
parent 76e6ca9c80
commit 358d3ec109

View File

@ -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() {