summary refs log tree commit diff
path: root/synapse/config/database.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-12-21 16:04:57 +0100
committerAmber Brown <hawkowl@atleastfornow.net>2018-12-22 02:04:57 +1100
commit9c2af7b2c51e31a1baf5ef523a251b946774468c (patch)
tree6c5fe1adda3c4728c36313de4fcfd53699ab2779 /synapse/config/database.py
parentFix indentation in default config (#4313) (diff)
downloadsynapse-9c2af7b2c51e31a1baf5ef523a251b946774468c.tar.xz
Add a script to generate a clean config file (#4315)
Diffstat (limited to 'synapse/config/database.py')
-rw-r--r--synapse/config/database.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/config/database.py b/synapse/config/database.py
index e915d9d09b..c8890147a6 100644
--- a/synapse/config/database.py
+++ b/synapse/config/database.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import os
 
 from ._base import Config
 
@@ -45,8 +46,8 @@ class DatabaseConfig(Config):
 
         self.set_databasepath(config.get("database_path"))
 
-    def default_config(self, **kwargs):
-        database_path = self.abspath("homeserver.db")
+    def default_config(self, data_dir_path, **kwargs):
+        database_path = os.path.join(data_dir_path, "homeserver.db")
         return """\
         # Database configuration
         database: