[gnome-builder] meson-toolchain-edition: ensure that the directory exists before the toolchain file
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] meson-toolchain-edition: ensure that the directory exists before the toolchain file
- Date: Wed, 26 Sep 2018 09:35:35 +0000 (UTC)
commit 77bdac50a2ff8522d75e07c09c4e828a7f596c2e
Author: Corentin Noël <corentin noel collabora com>
Date: Wed Sep 26 11:32:56 2018 +0200
meson-toolchain-edition: ensure that the directory exists before the toolchain file
Closes #641
Closes #581
src/plugins/meson/gbp-meson-toolchain-edition-preferences-addin.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/plugins/meson/gbp-meson-toolchain-edition-preferences-addin.c
b/src/plugins/meson/gbp-meson-toolchain-edition-preferences-addin.c
index bdcfd23ea..eb947d1a5 100644
--- a/src/plugins/meson/gbp-meson-toolchain-edition-preferences-addin.c
+++ b/src/plugins/meson/gbp-meson-toolchain-edition-preferences-addin.c
@@ -49,6 +49,12 @@ meson_toolchain_edition_preferences_add_new (GbpMesonToolchainEditionPreferences
g_assert (DZL_IS_PREFERENCES_BIN (emitter));
user_folder_path = g_build_filename (g_get_user_data_dir (), "meson", "cross", NULL);
+ if (g_mkdir_with_parents (user_folder_path, 0700) != 0)
+ {
+ g_critical ("Can't create %s", user_folder_path);
+ return;
+ }
+
for (uint i = 0; i < UINT_MAX; i++)
{
g_autofree gchar *possible_target = g_strdup_printf ("new_file%u", i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]