diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-06-24 17:24:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 17:24:35 +0100 |
commit | af8a9629057942d4dfa919df90d76d1fdc549606 (patch) | |
tree | f404909096abfe3635a02568f5ff02d79e7126f6 /synapse/config/repository.py | |
parent | Merge pull request #5499 from matrix-org/rav/cleanup_metrics (diff) | |
parent | changelog (diff) | |
download | synapse-af8a9629057942d4dfa919df90d76d1fdc549606.tar.xz |
Merge pull request #5523 from matrix-org/rav/arg_defaults
Stop conflating generated config and default config
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r-- | synapse/config/repository.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py index 15a19e0911..80a628d9b0 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -91,7 +91,9 @@ class ContentRepositoryConfig(Config): self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M")) self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M")) - self.media_store_path = self.ensure_directory(config["media_store_path"]) + self.media_store_path = self.ensure_directory( + config.get("media_store_path", "media_store") + ) backup_media_store_path = config.get("backup_media_store_path") @@ -148,7 +150,7 @@ class ContentRepositoryConfig(Config): (provider_class, parsed_config, wrapper_config) ) - self.uploads_path = self.ensure_directory(config["uploads_path"]) + self.uploads_path = self.ensure_directory(config.get("uploads_path", "uploads")) self.dynamic_thumbnails = config.get("dynamic_thumbnails", False) self.thumbnail_requirements = parse_thumbnail_requirements( config.get("thumbnail_sizes", DEFAULT_THUMBNAIL_SIZES) @@ -188,7 +190,7 @@ class ContentRepositoryConfig(Config): self.url_preview_url_blacklist = config.get("url_preview_url_blacklist", ()) - def default_config(self, data_dir_path, **kwargs): + def generate_config_section(self, data_dir_path, **kwargs): media_store = os.path.join(data_dir_path, "media_store") uploads_path = os.path.join(data_dir_path, "uploads") |