diff options
author | Alexander Larsson <alexl@redhat.com> | 2017-12-21 10:25:44 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2017-12-21 10:52:33 +0100 |
commit | b9b563de922d9b5e7b0ee430ed5dcaf759e5e7a4 (patch) | |
tree | a08077db8c9dbb333acf9b005b9e67e2ff776d36 | |
parent | 95b7ffd91e17cad35751fad3c847be6a7114d397 (diff) | |
download | flatpak-b9b563de922d9b5e7b0ee430ed5dcaf759e5e7a4.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
(cherry picked from commit 85282668ecf73b560c268f254a1555120313188f)
-rw-r--r-- | common/flatpak-dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 0e71ad11..a7e529c7 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -5582,6 +5582,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, @@ -5594,12 +5600,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}")); |