rem: feed.folder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder); 
add: { var folder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder); if (folder && !folder.isServer) feed.folder = folder; } 
context: function doAdd() {    var userAddedFeed = false;     var defaultQuickMode = gRSSServer.getBoolAttribute('quickMode')    var feedProperties = { feedName: "", feedLocation: "",                            serverURI: gRSSServer.serverURI,                            serverPrettyName: gRSSServer.prettyName,                             folderURI: "",                            quickMode: gRSSServer.getBoolAttribute('quickMode'),                            result: userAddedFeed};    feedProperties = openFeedEditor(feedProperties);    // if the user hit cancel, exit without doing anything    if (!feedProperties.result)      return;        if (!feedProperties.feedLocation)        return;    var itemResource = rdf.GetResource(feedProperties.feedLocation);    feed = new Feed(itemResource);    // if the user specified a specific folder to add the feed too, then set it here    if (feedProperties.folderURI)    {      var folderResource = rdf.GetResource(feedProperties.folderURI);         if (folderResource)        feed.folder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);    }    // set the server for the feed    feed.server = gRSSServer;    feed.quickMode = feedProperties.quickMode;    // update status text    updateStatusItem('statusText', document.getElementById("bundle_newsblog").getString('subscribe-validating'));    updateStatusItem('progressMeter', 0);    // validate the feed and download the articles    // we used to pass false which caused us to skip parsing then we'd     // turn around and download the feed again so we could actually parse the items...    // But now that this operation is asynch, just kick it off once...if we change this back    // modify feedDownloadCallback.downloaded to parse the feed...    // Also, disable the Add button while we are subscribing.    document.getElementById('addButton').setAttribute('disabled', 'true');    feed.download(true, feedDownloadCallback);}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/87994c3a80885c6e3658a8fb4ebf6426535bca0a/subscriptions.js/buggy/mail/extensions/newsblog/content/subscriptions.js