[ostree] core: One more minor tweak to recursive directory creation



commit c159188b81c1c9017bade1a73c205ba03c7ebd18
Author: Colin Walters <walters verbum org>
Date:   Sat Oct 13 17:54:19 2012 -0400

    core: One more minor tweak to recursive directory creation
    
    We would fail in the case where we were trying to create a
    subdirectory of /; this didn't actually happen, just noticed
    via code inspection.

 src/libotutil/ot-gio-utils.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/libotutil/ot-gio-utils.c b/src/libotutil/ot-gio-utils.c
index e06eebe..5c34982 100644
--- a/src/libotutil/ot-gio-utils.c
+++ b/src/libotutil/ot-gio-utils.c
@@ -71,11 +71,9 @@ ot_gfile_ensure_directory (GFile     *dir,
             {
               if (!ot_gfile_ensure_directory (parent, TRUE, error))
                 goto out;
-              if (!g_file_make_directory (dir, NULL, error))
-                goto out;
             }
-          else
-            g_assert_not_reached ();
+          if (!g_file_make_directory (dir, NULL, error))
+            goto out;
         }
       else if (!g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_EXISTS))
         {



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