From 9d8011042e0f2e5964f2140dc9148d9d903535a8 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Mon, 5 Jan 2015 17:09:40 -0800 Subject: [PATCH] fixed: changed Journaling for osx to prevent db corruption --- src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs b/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs index af478a07b..f7bcd8fb8 100644 --- a/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs +++ b/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.Datastore connectionBuilder.DataSource = dbPath; connectionBuilder.CacheSize = (int)-10.Megabytes(); connectionBuilder.DateTimeKind = DateTimeKind.Utc; - connectionBuilder.JournalMode = SQLiteJournalModeEnum.Wal; + connectionBuilder.JournalMode = OsInfo.IsOsx ? SQLiteJournalModeEnum.Truncate : SQLiteJournalModeEnum.Wal; connectionBuilder.Pooling = true; return connectionBuilder.ConnectionString;