rem: debugDump("selArray.length = " + count + "\n"); if (!count) 
add: if (count != 1) 
context: function AbDeleteDirectory(){    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();    promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);    var selArray = dirTree.selectedItems;    var count = selArray.length;    debugDump("selArray.length = " + count + "\n");    if (!count)        return;    var isPersonalOrCollectedAbsSelectedForDeletion = false;    var parentArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);    if (!parentArray)       return;     for ( var i = 0; i < count; ++i )    {        debugDump("    nodeId #" + i + " = " + selArray[i].getAttribute("id") + "\n");		        // check to see if personal or collected address books is selected for deletion.        // if yes, prompt the user an appropriate message saying these cannot be deleted        // if no, mark the selected items for deletion        if ((selArray[i].getAttribute("id") != "moz-abmdbdirectory://history.mab") &&             (selArray[i].getAttribute("id") != "moz-abmdbdirectory://abook.mab"))        {            var parent = selArray[i].parentNode.parentNode;            if (parent)            {                var parentId;                if (parent == dirTree)                    parentId = "moz-abdirectory://";                else	                    parentId = parent.getAttribute("id");                debugDump("    parentId #" + i + " = " + parentId + "\n");                var dirResource = rdf.GetResource(parentId);                var parentDir = dirResource.QueryInterface(Components.interfaces.nsIAbDirectory);                parentArray.AppendElement(parentDir);            }        }        else         {            if (promptService)            {                promptService.alert(window,                    gAddressBookBundle.getString("cannotDeleteTitle"),                     gAddressBookBundle.getString("cannotDeleteMessage"));            }            isPersonalOrCollectedAbsSelectedForDeletion = true;            break;        }    }    if (!isPersonalOrCollectedAbsSelectedForDeletion) {        var confirmDeleteAddressbook =            gAddressBookBundle.getString("confirmDeleteAddressbook");        if(!window.confirm(confirmDeleteAddressbook))            return;        top.addressbook.deleteAddressBooks(dirTree.database, parentArray, dirTree.selectedItems);    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/d08d4d3f9753b01573c0820f3dc3010c62295d11/addressbook.js/buggy/mailnews/addrbook/resources/content/addressbook.js