rem: var folderResource = GetFolderResource(folderOutliner, startIndex.value); var canRename = GetFolderAttribute(folderOutliner, folderResource, "CanRename") == "true"; 
add: var folderResource = GetFolderResource(folderTree, startIndex.value); var canRename = GetFolderAttribute(folderTree, folderResource, "CanRename") == "true"; 
context: function IsRenameFolderEnabled(){    var folderOutliner = GetFolderOutliner();    var selection = folderOutliner.outlinerBoxObject.selection;    if (selection.count == 1)    {        var startIndex = {};        var endIndex = {};        selection.getRangeAt(0, startIndex, endIndex);        var folderResource = GetFolderResource(folderOutliner, startIndex.value);        var canRename = GetFolderAttribute(folderOutliner, folderResource, "CanRename") == "true";        return canRename && isCommandEnabled("cmd_renameFolder");    }    else        return false;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/mail3PaneWindowCommands.js/buggy/mailnews/base/resources/content/mail3PaneWindowCommands.js