[epiphany/gnome-3-22] history-service: Fix write to database in read-only mode



commit 429ed9b34b0cc708e8bd0b79f08486893a58b114
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Feb 19 11:05:26 2017 -0600

    history-service: Fix write to database in read-only mode
    
    Now that SQLite enforces read-only mode for us, bugs like this will be
    uncovered....
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778649

 lib/history/ephy-history-service-hosts-table.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lib/history/ephy-history-service-hosts-table.c b/lib/history/ephy-history-service-hosts-table.c
index ad27403..bb0d18b 100644
--- a/lib/history/ephy-history-service-hosts-table.c
+++ b/lib/history/ephy-history-service-hosts-table.c
@@ -409,7 +409,8 @@ ephy_history_service_get_host_row_from_url (EphyHistoryService *self,
 
   if (host == NULL) {
     host = ephy_history_host_new (host_locations->data, hostname, 0, 1.0);
-    ephy_history_service_add_host_row (self, host);
+    if (!self->read_only)
+      ephy_history_service_add_host_row (self, host);
   }
 
   g_free (hostname);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]