summary refs log tree commit diff
path: root/synapse/config/repository.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-06-21 23:39:08 +0100
committerRichard van der Hoff <richard@matrix.org>2019-06-24 14:14:52 +0100
commit7c2f8881a955a509a4137119128974c4a58a9b88 (patch)
tree3d7c1964d9bfafe49020c80f60692dc7a3095409 /synapse/config/repository.py
parentMerge pull request #5516 from matrix-org/rav/acme_key_path (diff)
downloadsynapse-7c2f8881a955a509a4137119128974c4a58a9b88.tar.xz
Ensure that all config options have sensible defaults
This will enable us to skip the unintuitive behaviour where the generated
config and default config are the same thing.
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r--synapse/config/repository.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index 15a19e0911..43e6c4921f 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)