Bug 974771 - Ignore open request for unfinished download. r=wesj

This commit is contained in:
Eugen Sawin 2014-03-06 22:19:17 +01:00
parent d46c9d224d
commit ac1d419209

View File

@ -458,6 +458,10 @@ let Downloads = {
openDownload: function dl_openDownload(aItem) {
this._getDownloadForElement(aItem, function(aDownload) {
if (aDownload.state !== Ci.nsIDownloadManager.DOWNLOAD_FINISHED) {
// Do not open unfinished downloads.
return;
}
try {
let f = aDownload.targetFile;
if (f) f.launch();