rem: var path = profile.getProfilePath(name); dialogText = gProfileManagerBundle.getFormattedString("deleteprofile", [path]); dialogText = dialogText.replace(/\s*<html:br\/>/g,"\n"); var buttonPressed = {value:0} promptService.confirmEx(window, dialogTitle, dialogText, (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_2), gProfileManagerBundle.getString("dontDeleteFiles"), gProfileManagerBundle.getString("deleteFiles"), null, null, {value:0}, buttonPressed); if (buttonPressed.value != 2) DeleteProfile(buttonPressed.value == 1); 
add: var pathExists = true; try { var path = profile.getProfilePath(name); } catch (ex) { pathExists = false; } if (pathExists) { dialogText = gProfileManagerBundle.getFormattedString("deleteprofile", [path]); dialogText = dialogText.replace(/\s*<html:br\/>/g,"\n"); var buttonPressed = {value:0} promptService.confirmEx(window, dialogTitle, dialogText, (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_2), gProfileManagerBundle.getString("dontDeleteFiles"), gProfileManagerBundle.getString("deleteFiles"), null, null, {value:0}, buttonPressed); if (buttonPressed.value != 2) DeleteProfile(buttonPressed.value == 1); } else DeleteProfile(false); 
context: function ConfirmDelete(){  deleteButton = document.getElementById("delbutton");  if( deleteButton.getAttribute("disabled") == "true" )    return;  var profileTree = document.getElementById( "profiles" );  var selected = profileTree.selectedItems[0];  var name = selected.getAttribute("rowName");    var dialogTitle = gProfileManagerBundle.getString("deletetitle");  var dialogText;    if( selected.firstChild.firstChild.getAttribute("rowMigrate") == "no" ) {    var brandName = gBrandBundle.getString("brandShortName");    dialogText = gProfileManagerBundle.getFormattedString("delete4xprofile", [brandName]);    dialogText = dialogText.replace(/\s*<html:br\/>/g,"\n");        if (promptService.confirm(window, dialogTitle, dialogText)) {      profile.deleteProfile( name, false );      var profileKids = document.getElementById( "profilekids" )      profileKids.removeChild( selected );    }    return;  }  else {    var path = profile.getProfilePath(name);    dialogText = gProfileManagerBundle.getFormattedString("deleteprofile", [path]);    dialogText = dialogText.replace(/\s*<html:br\/>/g,"\n");    var buttonPressed = {value:0}    promptService.confirmEx(window, dialogTitle, dialogText,                            (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) +                            (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1) +                            (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_2),                            gProfileManagerBundle.getString("dontDeleteFiles"),                            gProfileManagerBundle.getString("deleteFiles"),                            null, null, {value:0}, buttonPressed);    if (buttonPressed.value != 2)        DeleteProfile(buttonPressed.value == 1);  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0f8b8afa3709f4c4a10a906a9e4d47b2775ea937/profileManager.js/buggy/profile/resources/content/profileManager.js