}
}
AddonRepository repository = AddonRepositoryImpl.forDirectory(this, directory);
if (mode.isImmutable())
repository = new ImmutableAddonRepository(repository);
this.repositories.add(repository);
lastRepoVersionSeen.put(repository, 0);
return repository;