rem: var updRoot = getFile(KEY_APPDIR); var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); var programFilesDir = fileLocator.get(KEY_PROGRAMFILES, Components.interfaces.nsILocalFile); if (programFilesDir.contains(updRoot, true)) { var relativePath = updRoot.QueryInterface(Components.interfaces.nsILocalFile). getRelativeDescriptor(programFilesDir); var userLocalDir = fileLocator.get(KEY_LOCALDATA, Components.interfaces.nsILocalFile).parent; updRoot.setRelativeDescriptor(userLocalDir, relativePath); 
add: var updRoot; try { updRoot = getFile(KEY_UPDROOT); } catch (e) { } if (updRoot) { 
context:   _getUpdateLogFile: function() {    function appendUpdateLogPath(root) {      var file = root.clone();      file.append("updates");      file.append("0");      file.append("update.log");      if (file.exists())        return file;      file = root;       file.append("updates");      file.append("last-update.log");      if (file.exists())        return file;      return null;    }    // See the local appdata first if app dir is under Program Files.    var file = null;    var updRoot = getFile(KEY_APPDIR);     var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]                                .getService(Components.interfaces.nsIProperties);    var programFilesDir = fileLocator.get(KEY_PROGRAMFILES,        Components.interfaces.nsILocalFile);    if (programFilesDir.contains(updRoot, true)) {      var relativePath = updRoot.QueryInterface(Components.interfaces.nsILocalFile).          getRelativeDescriptor(programFilesDir);      var userLocalDir = fileLocator.get(KEY_LOCALDATA,          Components.interfaces.nsILocalFile).parent;      updRoot.setRelativeDescriptor(userLocalDir, relativePath);      file = appendUpdateLogPath(updRoot);      // When updating from Fx 2.0.0.1 to 2.0.0.3 (or later) on Vista,      // we will have to see also user app data (see bug 351949).      if (!file)        file = appendUpdateLogPath(getFile(KEY_UAPPDATA));    }    // See the app dir if not found or app dir is out of Program Files.    if (!file)      file = appendUpdateLogPath(getFile(KEY_APPDIR));    return file;  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/3a6df140c7108b2603d0dc417d65ea84ccce4ecc/nsPostUpdateWin.js/buggy/toolkit/mozapps/update/src/nsPostUpdateWin.js