summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-07-16 15:47:59 -0400
committerRyan Lortie <desrt@desrt.ca>2012-07-16 15:50:59 -0400
commitd4cad3d9f47939491af91dc44348cd283e8eb9b8 (patch)
tree002a7d4810174a3d89ea85d1cfccb8ec220aaba7 /service
parent482c9b2c9c6a9b78e6c3a77443870690a6ae3298 (diff)
downloaddconf-d4cad3d9f47939491af91dc44348cd283e8eb9b8.tar.gz
service: remove ancient migration code
A long time ago before dconf supported profiles, the user database file was called ~/.config/dconf. We've had migration code to rename it to ~/.config/dconf/user for two years now. Drop that code.
Diffstat (limited to 'service')
-rw-r--r--service/dconf-state.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/service/dconf-state.c b/service/dconf-state.c
index 79e9753..dacc175 100644
--- a/service/dconf-state.c
+++ b/service/dconf-state.c
@@ -14,41 +14,8 @@ dconf_state_init_session (DConfState *state)
state->db_dir = g_build_filename (config_dir, "dconf", NULL);
- if (g_mkdir_with_parents (state->db_dir, 0700))
- {
- /* XXX remove this after a while... */
- if (errno == ENOTDIR)
- {
- gchar *tmp, *final;
-
- g_message ("Attempting to migrate ~/.config/dconf "
- "to ~/.config/dconf/user");
-
- tmp = g_build_filename (config_dir, "dconf-user.db", NULL);
-
- if (rename (state->db_dir, tmp))
- g_error ("Can not rename '%s' to '%s': %s",
- state->db_dir, tmp, g_strerror (errno));
-
- if (g_mkdir_with_parents (state->db_dir, 0700))
- g_error ("Can not create directory '%s': %s",
- state->db_dir, g_strerror (errno));
-
- final = g_build_filename (state->db_dir, "user", NULL);
-
- if (rename (tmp, final))
- g_error ("Can not rename '%s' to '%s': %s",
- tmp, final, g_strerror (errno));
-
- g_message ("Successful.");
-
- g_free (final);
- g_free (tmp);
- }
- else
- g_error ("Can not create directory '%s': %s",
- state->db_dir, g_strerror (errno));
- }
+ if (g_mkdir_with_parents (state->db_dir, 0700) != 0)
+ g_error ("Can not create directory '%s': %s", state->db_dir, g_strerror (errno));
}
static gboolean