Closed Bug 381535 Opened 19 years ago Closed 19 years ago

Jesse's downloads.rdf doesn't import to sqlite

Categories

(Toolkit :: Downloads API, defect)

x86
macOS
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: sdwilsh)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file Jesse's downloads.rdf
This downloads.rdf has a single entry, Google.htm. This morning's Firefox nightly created it, or at least added to it. When I have this downloads.rdf in my profile and launch an hourly, the entry doesn't appear in the download manager or in downloads.sqlite.
> <NC:DateEnded NC:parseType="Date">Mon May 21 21:32:50 PDT 2007 +368521</NC:DateEnded> No NC:DateStarted, which is somewhat important. The question is, do we really want to fail this way? That time is somewhat important, but I suppose if either one fails we could use the end time. But then, that introduces a lot of code bloat to our downloads history, and do we really want that? Is it important enough?
If I use this morning's nightly and alt+click a link to http://www.google.com/, I get a downloads.rdf entry without a DateStarted. So I think you should at least deal with a missing DateStarted.
Attachment #265624 - Attachment mime type: text/plain → text/xml
we should just make the beginning and end dates match, if this is something that might happen. Tossing the entry entirely seems unnecessary.
Assignee: nobody → sdwilsh
Attached patch v1.0Splinter Review
This wasn't hard to fix at all. Complete with a test case too!
Attachment #265885 - Flags: review?(mconnor)
Comment on attachment 265885 [details] [diff] [review] v1.0 r=me, though is DateEnded guaranteed to be there? and if its not, what does that impact? Can't we just fill in a random old date?
Attachment #265885 - Flags: review?(mconnor) → review+
I don't see why it *wouldn't* be there, but at the same time, I thought the same about DateStarted. If it isn't there, we just won't import that download from the history. I'm not sure I like the idea of putting in some random date, since that will change the order of the downloads.
Status: NEW → ASSIGNED
If the DateEnded being gone is an issue, I'd like to open up a new bug for that. Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; new revision: 1.80; previous revision: 1.79 Checking in toolkit/components/downloads/test/unit/head_download_manager.js; new revision: 1.2; previous revision: 1.1 Checking in toolkit/components/downloads/test/unit/test_download_manager_migration.js; new revision: 1.4; previous revision: 1.3 Checking in toolkit/components/downloads/test/unit/test_bug_381535.js; initial revision: 1.1 Checking in toolkit/components/downloads/test/unit/bug_381535_downloads.rdf; initial revision: 1.1
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Verified fixed. My original downloads.rdf (which had this problem *and* a completely corrupted entry) now imports as expected.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: