Last Comment Bug 603265 - Importing a .cvf with empty lines doesn't work
: Importing a .cvf with empty lines doesn't work
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Import (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 15.0
Assigned To: Leon Sha
:
Mentors:
: 674841 (view as bug list)
Depends on: 79709 600798
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-11 00:23 PDT by Ludovic Hirlimann [:Usul]
Modified: 2012-05-18 00:06 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (1.62 KB, patch)
2012-05-10 17:56 PDT, Leon Sha
mozilla: review+
Details | Diff | Review

Description Ludovic Hirlimann [:Usul] 2010-10-11 00:23:04 PDT
In bug 600798 there are two vcard that are suposed to work with the code added in bug 79709. The first one works, the second one doesn't.

Files can be found at http://hg.mozilla.org/qa/litmus-data/file/947e21f848da/thunderbird/import the emptylines_vcard_addressbook.vcf is the faulty file.
Comment 1 Ludovic Hirlimann [:Usul] 2011-08-17 01:58:24 PDT
*** Bug 674841 has been marked as a duplicate of this bug. ***
Comment 2 Leon Sha 2012-05-10 17:56:10 PDT
Created attachment 622993 [details] [diff] [review]
patch

Filter out the empty line.
Comment 3 David :Bienvenu 2012-05-14 15:36:30 PDT
Comment on attachment 622993 [details] [diff] [review]
patch

you could instead use do while and pass in aMore directly to ReadLine, so the code would look like this:

do {
  rv = aLineStream->ReadLine(line, aMore);
}
while (line.IsEmpty() && *aMore);
if (!*aMore)
  return rv;

Note You need to log in before you can comment on or make changes to this bug.