[gnome-initial-setup] summary: Don't recursively delete an old skeleton dir
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] summary: Don't recursively delete an old skeleton dir
- Date: Thu, 4 Oct 2012 21:51:32 +0000 (UTC)
commit 6c6bc938716227a42c96bb07b9ed7dde3378f40f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Oct 4 18:44:47 2012 -0300
summary: Don't recursively delete an old skeleton dir
There's no way this code can be reached now
.../pages/summary/gis-summary-page.c | 56 --------------------
1 files changed, 0 insertions(+), 56 deletions(-)
---
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index ed5dbad..62221cb 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -55,56 +55,6 @@ connect_to_gdm (GdmGreeter **greeter,
return res;
}
-static gboolean
-recursively_delete (GFile *file,
- GError **error_out)
-{
- GError *error = NULL;
-
- if (!g_file_query_exists (file, NULL))
- goto out;
-
- if (g_file_query_file_type (file, G_FILE_QUERY_INFO_NONE, NULL) == G_FILE_TYPE_DIRECTORY) {
- GFileEnumerator *enumerator;
- GFileInfo *info;
-
- enumerator = g_file_enumerate_children (file,
- G_FILE_ATTRIBUTE_STANDARD_NAME,
- G_FILE_QUERY_INFO_NONE,
- NULL,
- &error);
- if (error != NULL)
- goto out;
-
- while ((info = g_file_enumerator_next_file (enumerator, NULL, &error)) != NULL) {
- GFile *child;
- gboolean ret;
-
- if (error != NULL)
- goto out;
-
- child = g_file_get_child (file, g_file_info_get_name (info));
-
- ret = recursively_delete (child, &error);
- g_object_unref (child);
-
- if (!ret)
- goto out;
- }
- }
-
- if (!g_file_delete (file, NULL, &error))
- goto out;
-
- out:
- if (error != NULL) {
- g_propagate_error (error_out, error);
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
static void
copy_file_to_tmpfs (GFile *dest_base,
const char *dir,
@@ -143,12 +93,6 @@ copy_files_to_tmpfs (SummaryData *data)
const char *user = act_user_get_user_name (data->user_account);
GError *error = NULL;
- if (!recursively_delete (dest, &error)) {
- g_warning ("Unable to delete old skeleton folder: %s",
- error->message);
- goto out;
- }
-
if (!g_file_make_directory_with_parents (dest, NULL, &error)) {
g_warning ("Unable to make new skeleton folder: %s",
error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]