From 5e4555c6b3cded86edcc09859e006538b6a9ba0e Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 23 Jun 2019 12:42:21 -0400 Subject: [PATCH] validate: Create folders as needed when serializing timelines --- ges/ges-validate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ges/ges-validate.c b/ges/ges-validate.c index 4d17354..98ee6e4 100644 --- a/ges/ges-validate.c +++ b/ges/ges-validate.c @@ -53,11 +53,17 @@ static gboolean _serialize_project (GstValidateScenario * scenario, GstValidateAction * action) { const gchar *uri = gst_structure_get_string (action->structure, "uri"); + gchar *location = gst_uri_get_location (uri), + *dir = g_path_get_dirname (location); gboolean res; DECLARE_AND_GET_TIMELINE (scenario, action); gst_validate_printf (action, "Saving project to %s", uri); + g_mkdir_with_parents (dir, 0755); + g_free (location); + g_free (dir); + res = ges_timeline_save_to_uri (timeline, uri, NULL, TRUE, NULL); g_object_unref (timeline); -- 2.7.4