Skip to content

Commit 4c638f0

Browse files
Fizzadartulir
andcommitted
Add safety check before applying default synchronous
Co-authored-by: Tulir Asokan <[email protected]>
1 parent 1d8c2f4 commit 4c638f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mautrix/util/async_db/aiosqlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _add_missing_pragmas(init_commands: list[str]) -> list[str]:
134134
init_commands.append("PRAGMA foreign_keys = ON")
135135
if not has_journal_mode:
136136
init_commands.append("PRAGMA journal_mode = WAL")
137-
if not has_synchronous:
137+
if not has_synchronous and "PRAGMA journal_mode = WAL" in init_commands:
138138
init_commands.append("PRAGMA synchronous = NORMAL")
139139
if not has_busy_timeout:
140140
init_commands.append("PRAGMA busy_timeout = 5000")

0 commit comments

Comments
 (0)