[gnome-builder] flatpak: Allow project file to be a directory
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: Allow project file to be a directory
- Date: Tue, 31 Jan 2017 00:10:18 +0000 (UTC)
commit e1db3fa229293ac6e9b8d31f0db4c10c50fe839b
Author: Matthew Leeds <mleeds redhat com>
Date: Mon Jan 30 17:23:00 2017 -0600
flatpak: Allow project file to be a directory
In the case where the project file is a directory, we were leaving
project_name unset, which would put garbage into the flatpak-build
arguments. (At the moment the the project file for autotools projects
is a file, but we might as well not have bad code).
plugins/flatpak/gbp-flatpak-runtime.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime.c b/plugins/flatpak/gbp-flatpak-runtime.c
index e35971e..286b915 100644
--- a/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/plugins/flatpak/gbp-flatpak-runtime.c
@@ -832,7 +832,10 @@ gbp_flatpak_runtime_create_launcher (IdeRuntime *runtime,
g_autofree gchar *project_file_path = NULL;
project_file_path = g_file_get_path (project_file);
if (g_file_test (project_file_path, G_FILE_TEST_IS_DIR))
- project_path = g_file_get_path (project_file);
+ {
+ project_path = g_file_get_path (project_file);
+ project_name = g_file_get_basename (project_file);
+ }
else
{
g_autoptr(GFile) project_dir = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]