[gnome-initial-setup] Copy worker: create directories where needed



commit 38b466c9c36e66272affb50c67862197f3b47a1a
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 15 08:32:25 2012 -0500

    Copy worker: create directories where needed
    
    Without this, copying the dconf database and goa configuration
    does not work.

 .../gnome-initial-setup-copy-worker.c              |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup-copy-worker.c b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
index 983a673..a2e8ec0 100644
--- a/gnome-initial-setup/gnome-initial-setup-copy-worker.c
+++ b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
@@ -33,11 +33,14 @@ move_file_from_tmpfs (GFile *src_base,
 {
   GFile *dest_dir = g_file_new_for_path (dir);
   GFile *dest = g_file_get_child (dest_dir, path);
+  GFile *dest_parent = g_file_get_parent (dest);
   gchar *basename = g_file_get_basename (dest);
   GFile *src = g_file_get_child (src_base, basename);
 
   GError *error = NULL;
 
+  g_file_make_directory_with_parents (dest_parent, NULL, NULL);
+
   if (!g_file_move (src, dest, G_FILE_COPY_NONE,
                     NULL, NULL, NULL, &error)) {
     if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {



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