[gnome-builder/gnome-builder-3-30] meson-toolchain-edition: ensure that the directory exists before the toolchain file
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-30] meson-toolchain-edition: ensure that the directory exists before the toolchain file
- Date: Wed, 26 Sep 2018 18:03:29 +0000 (UTC)
commit a1b904067624ae41305b34ea893a04396a650f76
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]