# HG changeset patch
# User Alain Mazy <am@orthanc.team>
# Date 1726570062 -7200
# Node ID 09e337d45d226b6514d177e327a774fe1991938b
# Parent  b4e7a85cde80fb8559c95376b2cb64e27cf9bd6d
fix readonly

diff -r b4e7a85cde80 -r 09e337d45d22 OrthancServer/Sources/ServerIndex.cpp
--- a/OrthancServer/Sources/ServerIndex.cpp	Tue Sep 17 11:09:06 2024 +0200
+++ b/OrthancServer/Sources/ServerIndex.cpp	Tue Sep 17 12:47:42 2024 +0200
@@ -366,7 +366,7 @@
     // For some DB engines (like SQLite), make sure we flush the DB to disk at regular interval
     if (GetDatabaseCapabilities().HasFlushToDisk())
     {
-      if (!readOnly)
+      if (readOnly)
       {
         LOG(WARNING) << "READ-ONLY SYSTEM: not starting the flush disk thread";
       }
@@ -381,7 +381,7 @@
     // -> make sure they are updated at regular interval
     if (GetDatabaseCapabilities().HasUpdateAndGetStatistics())
     {
-      if (!readOnly)
+      if (readOnly)
       {
         LOG(WARNING) << "READ-ONLY SYSTEM: not starting the UpdateStatisticsThread";
       }
@@ -391,7 +391,7 @@
       }
     }
 
-    if (!readOnly)
+    if (readOnly)
     {
       LOG(WARNING) << "READ-ONLY SYSTEM: not starting the unstable resources monitor thread";
     }