mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 06:05:44 +00:00
Bug 974771 - Ignore open request for unfinished download. r=wesj
This commit is contained in:
parent
d46c9d224d
commit
ac1d419209
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user