summaryrefslogtreecommitdiff
path: root/common/flatpak-dir.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2017-12-21 10:25:44 +0100
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-21 09:49:53 +0000
commit85282668ecf73b560c268f254a1555120313188f (patch)
tree8b141d4350154dad37b5b21dece68e4cd080e145 /common/flatpak-dir.c
parent006a5f2adecdf13a75d1ef6d2fe1d586abbb6f68 (diff)
downloadflatpak-85282668ecf73b560c268f254a1555120313188f.tar.gz
deploy: Create the binary wrappers after having rewritten the exports
Interestingly the telegram appid is "org.telegram.desktop", which means the wrapper ends up having a .desktop extension which confuses the desktop file exporter. We fix this by rewriting any exports before creating the wrappers. Fixes https://github.com/flathub/org.telegram.desktop/issues/18 Closes: #1270 Approved by: alexlarsson
Diffstat (limited to 'common/flatpak-dir.c')
-rw-r--r--common/flatpak-dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index 2f3a245a..6b024e4b 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -5586,6 +5586,12 @@ flatpak_dir_deploy (FlatpakDir *self,
if (!flatpak_mkdir_p (bindir, cancellable, error))
return FALSE;
+ if (!flatpak_rewrite_export_dir (ref_parts[1], ref_parts[3], ref_parts[2],
+ keyfile, export,
+ cancellable,
+ error))
+ return FALSE;
+
bin_data = g_strdup_printf ("#!/bin/sh\nexec %s/flatpak run --branch=%s --arch=%s %s \"$@\"\n",
FLATPAK_BINDIR, escaped_branch, escaped_arch, escaped_app);
if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE,
@@ -5598,12 +5604,6 @@ flatpak_dir_deploy (FlatpakDir *self,
if (r == -1)
return glnx_throw_errno_prefix (error, "fchmodat");
- if (!flatpak_rewrite_export_dir (ref_parts[1], ref_parts[3], ref_parts[2],
- keyfile, export,
- cancellable,
- error))
- return FALSE;
-
}
g_variant_builder_init (&metadata_builder, G_VARIANT_TYPE ("a{sv}"));