aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-11-23 18:38:02 -0600
committerJP Dillingham <jp@dillingham.me>2025-11-23 18:38:02 -0600
commit3e69af61e6ab42d79b9ff86adf7729e8abc70eed (patch)
tree41c799babd5509638bee59afe9bd995fc6e8c6c5 /src/slskd/Shares
parent119a3925da7fdf5f659bfa4c8e61e39a7148ba3e (diff)
parent318d1c16f80f6d48a408fb95b77c5a42402bf7df (diff)
downloadslskd-3e69af61e6ab42d79b9ff86adf7729e8abc70eed.tar.gz
Merge remote-tracking branch 'origin/master' into statistics
Diffstat (limited to 'src/slskd/Shares')
-rw-r--r--src/slskd/Shares/SqliteShareRepository.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slskd/Shares/SqliteShareRepository.cs b/src/slskd/Shares/SqliteShareRepository.cs
index f457adba..711bb21e 100644
--- a/src/slskd/Shares/SqliteShareRepository.cs
+++ b/src/slskd/Shares/SqliteShareRepository.cs
@@ -157,7 +157,9 @@ namespace slskd.Shares
{
using var conn = GetConnection();
- conn.ExecuteNonQuery("PRAGMA journal_mode=WAL");
+ // warning: with synchronous=0, an operating system crash can leave the database corrupted.
+ // if this occurs we should generate a new one, so this is _probably_ ok
+ conn.ExecuteNonQuery("PRAGMA journal_mode=WAL; PRAGMA synchronous=0;");
if (discardExisting)
{