summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-08-20 17:10:59 +0100
committerPhilip Withnall <withnall@endlessm.com>2018-08-20 17:10:59 +0100
commit8d76d4881f14af8a78029a89b43ce99cc558a65f (patch)
tree1765b9bdae5258808f30b421b3c95b9b15e69eef
parentfc6852c47a65dfadf415a09706e3dadf97be5ec0 (diff)
downloaddconf-8d76d4881f14af8a78029a89b43ce99cc558a65f.tar.gz
service: Rename a method to make its behaviour more apparent
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 <withnall@endlessm.com>
-rw-r--r--service/dconf-gvdb-utils.c6
-rw-r--r--service/dconf-gvdb-utils.h2
-rw-r--r--service/dconf-writer.c2
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 <string.h>
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;