rem: if (this.icon != "webrunner") { var iconName = this.icon + iconExt; if (reader.hasEntry(iconName)) { var appIcon = appSandbox.clone(); appIcon.append("icons"); appIcon.append("default"); appIcon.append(iconName); if (appIcon.exists()) appIcon.remove(false); appIcon.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600); reader.extract(iconName, appIcon); } 
add: var iconName = this.icon + iconExt; var appIcon = appSandbox.clone();  appIcon.append("icons"); appIcon.append("default");  if (reader.hasEntry(iconName)) { appIcon.append(iconName); if (appIcon.exists()) appIcon.remove(false); appIcon.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600); reader.extract(iconName, appIcon); } else {   var defaultIcon = dirSvc.get("resource:app", Ci.nsIFile);  defaultIcon.append("chrome"); defaultIcon.append("icons"); defaultIcon.append("default"); defaultIcon.append(iconName);  defaultIcon.copyTo(appIcon, ""); 
context:   install : function(aFile) {    var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);    try {      var reader = Cc["@mozilla.org/libjar/zip-reader;1"].createInstance(Ci.nsIZipReader);      reader.open(aFile);      reader.test(null);      // Extract the webapp.ini to a temp location so it can be parsed      var tempINI = dirSvc.get("TmpD", Ci.nsIFile);      tempINI.append("webapp.ini");      tempINI.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);      reader.extract("webapp.ini", tempINI);      this.readINI(tempINI);      tempINI.remove(false);      // Creating a webapp install requires an ID      if (this.id.length > 0) {        var xulRuntime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);        var iconExt = "";        var os = xulRuntime.OS.toLowerCase();        if (os == "winnt")          iconExt = ".ico";        else if (os == "linux")          iconExt = ".xpm";        else if (os == "darwin")          iconExt = ".icns";        // Now we will build the webapp folder in the profile        var appSandbox = dirSvc.get("ProfD", Ci.nsIFile);        appSandbox.append("webapps");        appSandbox.append(this.id);        // Make a copy so we can return it        aFile = appSandbox.clone();        var appINI = appSandbox.clone();        appINI.append("webapp.ini");        if (appINI.exists())          appINI.remove(false);        appINI.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);        reader.extract("webapp.ini", appINI);        if (reader.hasEntry("webapp.js")) {          var appScript = appSandbox.clone();          appScript.append("webapp.js");          if (appScript.exists())            appScript.remove(false);          appScript.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);          reader.extract("webapp.js", appScript);        }        // We check for an OS specific and common stylesheet,        // defaulting to the OS specific sheet        if (reader.hasEntry(os + "/webapp.css") || reader.hasEntry("webapp.css")) {          var appStyle = appSandbox.clone();          appStyle.append("webapp.css");          if (appStyle.exists())            appStyle.remove(false);          appStyle.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);          if (reader.hasEntry(os + "/webapp.css"))            reader.extract(os + "/webapp.css", appStyle);          else            reader.extract("webapp.css", appStyle);        }        if (this.icon != "webrunner") {          var iconName = this.icon + iconExt;          if (reader.hasEntry(iconName)) {            var appIcon = appSandbox.clone();            appIcon.append("icons");            appIcon.append("default");            appIcon.append(iconName);            if (appIcon.exists())              appIcon.remove(false);            appIcon.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);            reader.extract(iconName, appIcon);          }        }      }    }    catch (e) {      Components.utils.reportError(e);    }    return aFile;  },
meta: 2142	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2142/c7e61c24265be578995b395e46adb128848371e0/profile.js/clean/app/chrome/content/profile.js