aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-11-16 18:38:40 -0600
committerGitHub <noreply@github.com>2025-11-16 18:38:40 -0600
commite80a47cd2c7ff2bbae682f64a448eaafbff59128 (patch)
tree7fe63e661e8a1be00f455b67b3277f1487c71830 /src/slskd/Shares
parente763715bd89cbf8c10537fc72905d4358caf8215 (diff)
parent3d4661d3eec83d9c42932501c340abe27f201f8a (diff)
downloadslskd-e80a47cd2c7ff2bbae682f64a448eaafbff59128.tar.gz
Merge branch 'master' into unix-socket-validation
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)
{