add:  gCurrentFolderToReroot = selectedFolderUri; 
context: function MsgCompactFolder(isAll) {	//get the selected elements	var tree = GetFolderTree();    if (tree)    {        var folderList = tree.selectedItems;        if (folderList)        {            var selctedFolderUri = "";            var isImap = false;            if (folderList.length == 1)            {                selectedFolderUri = folderList[0].getAttribute('id');                if (selectedFolderUri.indexOf("imap:") != -1)                {                    isImap = true;                }                else                {                    ClearThreadPaneSelection();                    ClearMessagePane();                }            }            var i;            var folder;            for(i = 0; i < folderList.length; i++)            {                folder = folderList[i];                if (folder)                {                    folderuri = folder.getAttribute('id');                    dump(folderuri + "\n");                    dump("folder = " + folder.localName + "\n");                     try                    {                      messenger.CompactFolder(tree.database, folder.resource, isAll);                    }                    catch(e)                    {                      dump ("Exception : messenger.CompactFolder \n");                    }                }            }            if (!isImap && selectedFolderUri && selectedFolderUri != "")            {                /* this doesn't work; local compact is now an async operation                dump("selected folder = " + selectedFolderUri + "\n");                var selectedFolder =                    document.getElementById(selectedFolderUri);                ChangeSelection(tree, selectedFolder);                */                tree.clearItemSelection();            }        }	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/85709f0628624fc2960a1cb36da4f206a9badfa0/widgetglue.js/clean/mailnews/base/resources/content/widgetglue.js