add:  var dirExists;  try { var profileDir = profile.getProfileDir(profilename); dirExists = profileDir.exists(); } catch (e) { dirExists = false; }  if (dirExists == false) { var brandName = gBrandBundle.getString("brandShortName"); var alertString = gProfileManagerBundle.getFormattedString("profDirMissing", [brandName, profilename]); alertString = alertString.replace(/\s*<html:br\/>/g,"\n"); alert(alertString); return; }  
context: function onStart(){  var profileTree = document.getElementById("profiles");  var selected = profileTree.selectedItems[0];  var profilename = selected.getAttribute("profile_name");  if( selected.firstChild.firstChild.getAttribute("rowMigrate") == "no" ) {    var lString = gProfileManagerBundle.getString("migratebeforestart");    lString = lString.replace(/\s*<html:br\/>/g,"\n");    lString = lString.replace(/%brandShortName%/gi,                              gBrandBundle.getString("brandShortName"));    var title = gProfileManagerBundle.getString("migratetitle");    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();    promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);    if (promptService.confirm(window, title, lString))      profile.migrateProfile( profilename, true );    else      return false;  }  // start in online or offline mode  var offlineState = document.getElementById("offlineState");  var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",                                                  "nsIIOService");  ioService.offline = offlineState.checked;  try {    profile.startApprunner(profilename);    ExitApp();  }  catch (ex) {    //var stringA = gProfileManagerBundle.getString(failProfileStartA);    //var stringB = gProfileManagerBundle.getString(failProfileStartB);    //alert(stringA + " " + profilename + " " + stringB);  }  return true;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/a3a44ebd54e199b6b4730222f3ebce391266ba8e/profileSelection.js/clean/profile/resources/content/profileSelection.js