Closed Bug 811889 Opened 9 years ago Closed 9 years ago

downloads failing with DOWNLOAD_BLOCKED_POLICY are never deleted

Categories

(Toolkit :: Downloads API, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: mmc, Assigned: mmc)

Details

Attachments

(1 file)

It sure looks like AV blocked downloads failing with DOWNLOAD_BLOCKED_POLICY are never deleted on Win XP:

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/downloads/nsDownloadManager.cpp#1434

startState is set to DOWNLOAD_BLOCKED_POLICY and then never used.
Patch coming, unless you'd like to take it, Jim.
Assignee: nobody → mmc
Does anything actually get downloaded? We cancel it right after it gets queued.
CleanUp() seems to think that it does and tries to delete downloads with state DOWNLOAD_BLOCKED_POLICY, of which there will be none. It could be that the cleanup code is wrong -- either way there is an unused enum.
It must be downloaded already, since otherwise the scan doesn't make sense. CancelDownload is a no-op if the file has already been downloaded.
Comment on attachment 681997 [details] [diff] [review]
Set download state to DOWNLOAD_POLICY_BLOCKED if the av scan fails

ah, totally lame on my part. Now I see what the issues is. :/ Thanks for the fix.
Attachment #681997 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/3a7e4882559f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.