       var folders = rootFolder.GetSubFolders(); var msgFolder = rootFolder.QueryInterface(Components.interfaces.nsIMsgFolder); 
       var folders = rootFolder.GetSubFolders(); var msgFolder = rootFolder.QueryInterface(Components.interfaces.nsIMsgFolder); 
function setDefaultCopiesAndFoldersPrefs(identity, server, accountData){	dump("finding folders on server = " + server.hostName + "\n");	var rootFolder = server.rootFolder;	// we need to do this or it is possible that the server's draft,    // stationery fcc folder will not be in rdf	//	// this can happen in a couple cases	// 1) the first account we create, creates the local mail.  since    // local mail was just created, it obviously hasn't been opened,    // or in rdf..	// 2) the account we created is of a type where    // defaultCopiesAndFoldersPrefsToServer is true	// this since we are creating the server, it obviously hasn't been    // opened, or in rdf.    //    // this makes the assumption that the server's draft, stationery fcc folder    // are at the top level (ie subfolders of the root folder.)  this works    // because we happen to be doing things that way, and if the user changes    // that, it will work because to change the folder, it must be in rdf,    // coming from the folder cache, in the worst case.    var folders = rootFolder.GetSubFolders();    var msgFolder = rootFolder.QueryInterface(Components.interfaces.nsIMsgFolder);    /**      * When a new account is created, folders 'Sent', 'Drafts'     * and 'Templates' are not created then, but created on demand at runtime.      * But we do need to present them as possible choices in the Copies and Folders      * UI. To do that, folder URIs have to be created and stored in the prefs file.      * So, if there is a need to build special folders, append the special folder      * names and create right URIs.     */    var folderDelim = "/";    /* we use internal names known to everyone like Sent, Templates and Drafts */    /* if folder names were already given in isp rdf, we use them,       otherwise we use internal names known to everyone like Sent, Templates and Drafts */        var draftFolder = (accountData.identity && accountData.identity.draftFolder ? accountData.identity.draftFolder : "Drafts");    var stationeryFolder = (accountData.identity && accountData.identity.stationeryFolder ? accountData.identity.stationeryFolder : "Templates");    var fccFolder = (accountData.identity && accountData.identity.fccFolder ? accountData.identity.fccFolder : "Sent");    identity.draftFolder = msgFolder.server.serverURI+ folderDelim + draftFolder;    identity.stationeryFolder = msgFolder.server.serverURI+ folderDelim + stationeryFolder;    identity.fccFolder = msgFolder.server.serverURI+ folderDelim + fccFolder;            	    identity.fccFolderPickerMode = (accountData.identity && accountData.identity.fccFolder ? 1 : gDefaultSpecialFolderPickerMode);    identity.draftsFolderPickerMode = (accountData.identity && accountData.identity.draftFolder ? 1 : gDefaultSpecialFolderPickerMode);    identity.tmplFolderPickerMode = (accountData.identity && accountData.identity.stationeryFolder ? 1 : gDefaultSpecialFolderPickerMode);}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/0b0d6f8dac81d4109c3210508e9af2e791e91fb7/AccountWizard.js/buggy/mailnews/base/prefs/resources/content/AccountWizard.js