aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-11-22 18:36:31 -0600
committerGitHub <noreply@github.com>2025-11-22 18:36:31 -0600
commit47490e366b5bc4b2a1679fba50655697afbe7137 (patch)
treeae98bb4fb66d20e5fecd69267bcbb17d80c4986b /src/slskd/Shares
parent2e073014a003fc4e972a9a2677fccd3d30074cd2 (diff)
parent6ba7311d48b95ca75f49b3b28c1a8db810f87fe1 (diff)
downloadslskd-47490e366b5bc4b2a1679fba50655697afbe7137.tar.gz
Merge branch 'master' into dependabot/npm_and_yarn/src/web/axios-0.30.2
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)
{