From c978377dd150b60898830796c3bfb2ac06aff99e Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 11 Aug 2016 13:02:20 +0200 Subject: [PATCH] build-export: Don't fail desktpo validation for absolute pathnames in Exec= --- app/flatpak-builtins-build-export.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c index a23fe9cc..6d3fecbf 100644 --- a/app/flatpak-builtins-build-export.c +++ b/app/flatpak-builtins-build-export.c @@ -327,7 +327,18 @@ check_refs: } argv = g_strsplit (command, " ", 0); - exec_path = g_strconcat ("bin/", argv[0], NULL); + if (g_path_is_absolute (argv[0])) + { + if (g_str_has_prefix (argv[0], "/app/")) + exec_path = g_strdup (argv[0] + 5); + else + exec_path = g_strdup (argv[0]); + } + else + { + exec_path = g_strconcat ("bin/", argv[0], NULL); + } + bin_file = g_file_resolve_relative_path (files, exec_path); if (!g_file_query_exists (bin_file, NULL)) {