rem: this.feed.folder.gettingNewMessages = false; 
add: msgFolder.gettingNewMessages = false; 
context:   writeToFolder: function()   {    debug(this.identity + " writing to message folder" + this.feed.name + "\n");      var server = this.feed.server;    this.mUnicodeConverter.charset = this.characterSet;    // If the sender isn't a valid email address, quote it so it looks nicer.    if (this.author && this.author.indexOf('@') == -1)      this.author = '<' + this.author + '>';    // Convert the title to UTF-16 before performing our HTML entity replacement    // reg expressions.    var title = this.title;     // the subject may contain HTML entities.    // Convert these to their unencoded state. i.e. &amp; becomes '&'    title = title.replace(/&lt;/g, '<');    title = title.replace(/&gt;/g, '>');    title = title.replace(/&quot;/g, '"');    title = title.replace(/&amp;/g, '&');      // Compress white space in the subject to make it look better.    title = title.replace(/[\t\r\n]+/g, " ");    this.title = this.mimeEncodeSubject(title, this.characterSet);    // If the date looks like it's in W3C-DTF format, convert it into    // an IETF standard date.  Otherwise assume it's in IETF format.    if (this.mDate.search(/^\d\d\d\d/) != -1)      this.mDate = W3CToIETFDate(this.mDate);    // Escape occurrences of "From " at the beginning of lines of content    // per the mbox standard, since "From " denotes a new message, and add    // a line break so we know the last line has one.    this.content = this.content.replace(/([\r\n]+)(>*From )/g, "$1>$2");    this.content += "\n";    // The opening line of the message, mandated by standards to start with    // "From ".  It's useful to construct this separately because we not only    // need to write it into the message, we also need to use it to calculate    // the offset of the X-Mozilla-Status lines from the front of the message    // for the statusOffset property of the DB header object.    var openingLine = 'From - ' + this.mDate + '\n';    var source =      openingLine +      'X-Mozilla-Status: 0000\n' +      'X-Mozilla-Status2: 00000000\n' +      'X-Mozilla-Keys:                                                                                \n' +      'Date: ' + this.mDate + '\n' +      'Message-Id: <' + this.messageID + '>\n' +      'From: ' + this.author + '\n' +      'MIME-Version: 1.0\n' +      'Subject: ' + this.title + '\n' +      'Content-Transfer-Encoding: 8bit\n' +      'Content-Base: ' + this.mURL + '\n';    if (this.enclosure && this.enclosure.mFileName)    {      var boundaryID = source.length + this.enclosure.mLength;      source += 'Content-Type: multipart/mixed;\n boundary="' + ENCLOSURE_HEADER_BOUNDARY_PREFIX + boundaryID + '"' + '\n\n' +                'This is a multi-part message in MIME format.\n' + ENCLOSURE_BOUNDARY_PREFIX + boundaryID + '\n' +                'Content-Type: text/html; charset=' + this.characterSet + '\n' +                'Content-Transfer-Encoding: 8bit\n' +                 this.content;      source += this.enclosure.convertToAttachment(boundaryID);    }    else    {      source += 'Content-Type: text/html; charset=' + this.characterSet + '\n' +                '\n' + this.content;                   }    debug(this.identity + " is " + source.length + " characters long");    // Get the folder and database storing the feed's messages and headers.    folder = this.feed.folder.QueryInterface(Components.interfaces.nsIMsgLocalMailFolder);    this.feed.folder.gettingNewMessages = true;    // source is a unicode string, we want to save a char * string in the original charset. So convert back    folder.addMessage(this.mUnicodeConverter.ConvertFromUnicode(source));    this.feed.folder.gettingNewMessages = false;    this.markStored();  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/87b65b6124398b724c3b919a3961e0e6be2c18b7/FeedItem.js/buggy/mail/extensions/newsblog/content/FeedItem.js