From 185de3462c2e5518d3a6ea6492bbbf962a5dce64 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 29 Apr 2017 08:38:23 -0400 Subject: [PATCH] Enable file forwarding for %u as well Do the same Exec line mangling for file forwarding if we encounter %u or %U. flatpak run is smart enough to handle file: uris and ignore others. --- common/flatpak-dir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 79a993b9..473c2f0e 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -3411,7 +3411,8 @@ export_desktop_file (const char *app, for (i = 1; i < old_argc; i++) { - if (strcasecmp (old_argv[i], "%f") == 0) + if (strcasecmp (old_argv[i], "%f") == 0 || + strcasecmp (old_argv[i], "%u") == 0) { g_string_append (new_exec, " --file-forwarding"); break; @@ -3425,7 +3426,8 @@ export_desktop_file (const char *app, { g_autofree char *arg = maybe_quote (old_argv[i]); - if (strcasecmp (arg, "%f") == 0) + if (strcasecmp (arg, "%f") == 0 || + strcasecmp (arg, "%u") == 0) g_string_append_printf (new_exec, " @@ %s @@", arg); else g_string_append_printf (new_exec, " %s", arg);