[libgsystem] fileutils: Use new libglnx shutil mkdir-p API



commit 552f1d6688e9e9f25e4500b9a2eeb6c1336903ac
Author: Colin Walters <walters verbum org>
Date:   Tue Apr 7 15:11:04 2015 -0400

    fileutils: Use new libglnx shutil mkdir-p API
    
    Mostly for testing coverage.

 libglnx                  |    2 +-
 src/gsystem-file-utils.c |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libglnx b/libglnx
index 1288bd8..e72bbde 160000
--- a/libglnx
+++ b/libglnx
@@ -1 +1 @@
-Subproject commit 1288bd850829c66935d3f12c3363a32c87c1421c
+Subproject commit e72bbdebb03f5d39c7f32869299ca4284786344c
diff --git a/src/gsystem-file-utils.c b/src/gsystem-file-utils.c
index bc7dc35..bcad396 100644
--- a/src/gsystem-file-utils.c
+++ b/src/gsystem-file-utils.c
@@ -1213,12 +1213,16 @@ gs_file_ensure_directory (GFile         *dir,
       if (with_parents &&
           g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
         {
-          g_clear_error (&temp_error);
-
           parent = g_file_get_parent (dir);
           if (parent)
             {
-              if (!gs_file_ensure_directory (parent, TRUE, cancellable, error))
+              g_clear_error (&temp_error);
+
+              if (!glnx_shutil_mkdir_p_at (AT_FDCWD,
+                                           gs_file_get_path_cached (parent),
+                                           0777,
+                                           cancellable,
+                                           error))
                 goto out;
             }
           if (!gs_file_ensure_directory (dir, FALSE, cancellable, error))


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