Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Created November 14, 2016 19:57
Show Gist options
  • Select an option

  • Save rhelmer/149096163e9e052c9018e1c28e2880a6 to your computer and use it in GitHub Desktop.

Select an option

Save rhelmer/149096163e9e052c9018e1c28e2880a6 to your computer and use it in GitHub Desktop.
class SystemAddonInstallLocation extends DirectoryInstallLocation {
/**
* @param aName
* The string identifier for the install location
* @param aDirectory
* The nsIFile directory for the install location
* @param aScope
* The scope of add-ons installed in this location
* @param aResetSet
* True to throw away the current add-on set
*/
constructor(aName, aDirectory, aScope, aResetSet) {
let _addonSet = SystemAddonInstallLocation._loadAddonSet();
let _directory = null;
if (_addonSet.directory) {
_directory = aDirectory.clone();
_directory.append(_addonSet.directory);
logger.info("SystemAddonInstallLocation scanning directory " + _directory.path);
}
else {
logger.info("SystemAddonInstallLocation directory is missing");
}
super(aName, _directory, aScope);
this._directory = _directory;
this._baseDir = aDirectory;
this._nextDir = null;
this._stagingDirLock = 0;
if (aResetSet) {
this.resetAddonSet();
}
this.locked = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment