From 8d76d4881f14af8a78029a89b43ce99cc558a65f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Aug 2018 17:10:59 +0100 Subject: service: Rename a method to make its behaviour more apparent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s a little counterintuitive that a function called ‘read’ could sometimes move a file (which could be considered a write). Signed-off-by: Philip Withnall --- service/dconf-gvdb-utils.c | 6 +++--- service/dconf-gvdb-utils.h | 2 +- service/dconf-writer.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/service/dconf-gvdb-utils.c b/service/dconf-gvdb-utils.c index fdd90e2..93a4719 100644 --- a/service/dconf-gvdb-utils.c +++ b/service/dconf-gvdb-utils.c @@ -32,9 +32,9 @@ #include DConfChangeset * -dconf_gvdb_utils_read_file (const gchar *filename, - gboolean *file_missing, - GError **error) +dconf_gvdb_utils_read_and_back_up_file (const gchar *filename, + gboolean *file_missing, + GError **error) { DConfChangeset *database; GError *my_error = NULL; diff --git a/service/dconf-gvdb-utils.h b/service/dconf-gvdb-utils.h index 5b3e3a9..7076781 100644 --- a/service/dconf-gvdb-utils.h +++ b/service/dconf-gvdb-utils.h @@ -23,7 +23,7 @@ #include "../common/dconf-changeset.h" -DConfChangeset * dconf_gvdb_utils_read_file (const gchar *filename, +DConfChangeset * dconf_gvdb_utils_read_and_back_up_file (const gchar *filename, gboolean *file_missing, GError **error); gboolean dconf_gvdb_utils_write_file (const gchar *filename, diff --git a/service/dconf-writer.c b/service/dconf-writer.c index 00d34fe..5fb3467 100644 --- a/service/dconf-writer.c +++ b/service/dconf-writer.c @@ -107,7 +107,7 @@ dconf_writer_real_begin (DConfWriter *writer, { gboolean missing; - writer->priv->commited_values = dconf_gvdb_utils_read_file (writer->priv->filename, &missing, error); + writer->priv->commited_values = dconf_gvdb_utils_read_and_back_up_file (writer->priv->filename, &missing, error); if (!writer->priv->commited_values) return FALSE; -- cgit v1.2.1