summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-04-07 15:11:04 -0400
committerColin Walters <walters@verbum.org>2015-04-07 15:11:04 -0400
commit552f1d6688e9e9f25e4500b9a2eeb6c1336903ac (patch)
treece1ac35dd2330c8ac00eb35c8ff0aab070639b9e
parent05b13e83a3a818e3443b8474c70af198bd10c53a (diff)
downloadlibgsystem-552f1d6688e9e9f25e4500b9a2eeb6c1336903ac.tar.gz
fileutils: Use new libglnx shutil mkdir-p API
Mostly for testing coverage.
m---------libglnx0
-rw-r--r--src/gsystem-file-utils.c10
2 files changed, 7 insertions, 3 deletions
diff --git a/libglnx b/libglnx
-Subproject 1288bd850829c66935d3f12c3363a32c87c1421
+Subproject e72bbdebb03f5d39c7f32869299ca4284786344
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))