From a9e217a729944da684d6a4adf6945f5c42409df5 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 10 Apr 2017 10:22:26 +0200 Subject: [PATCH] Bundle sources, bzr: set error when repo can not be found --- builder/builder-source-bzr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/builder-source-bzr.c b/builder/builder-source-bzr.c index 567aaf1c..ea95b545 100644 --- a/builder/builder-source-bzr.c +++ b/builder/builder-source-bzr.c @@ -274,10 +274,11 @@ builder_source_bzr_bundle (BuilderSource *source, g_autofree char *app_dir_path = NULL; sources_dir = get_mirror_dir (self, context); - sources_dir_path = g_file_get_path (sources_dir); - if (!g_file_query_exists (sources_dir, NULL)) + if (sources_dir == NULL) { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Can't locate repo with URL '%s'", self->url); return FALSE; + } base_name = g_file_get_basename (sources_dir); @@ -301,6 +302,7 @@ builder_source_bzr_bundle (BuilderSource *source, NULL); dest_dir = g_file_new_for_path (dest_dir_path); + sources_dir_path = g_file_get_path (sources_dir); if (!bzr (bzr_sources_dir, NULL, error, "branch", sources_dir_path, base_name_tmp, NULL) || !g_file_move (dest_dir_tmp, dest_dir, 0, NULL, NULL, NULL, error))