diff options
author | robxnano <12855608-robxnano@users.noreply.gitlab.com> | 2023-11-07 18:43:30 +0300 |
---|---|---|
committer | robxnano <12855608-robxnano@users.noreply.gitlab.com> | 2023-11-08 20:32:19 +0300 |
commit | 6c06f87665ca100c23e867df60aeefa244272229 (patch) | |
tree | 495efe294e77770fbdeeb45102c2a54c28bfdb28 /plugins | |
parent | 13651230b5b58b3988968868903a1736f6f2f212 (diff) |
export: Don't automatically add file extension
xdg-desktop-portal only allows access to the file named in the
save dialog. Removing this code allows for better compatibility
with sandboxing APIs.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rdp/rdp_file.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/rdp/rdp_file.c b/plugins/rdp/rdp_file.c index cfd8c3057..fc161e850 100644 --- a/plugins/rdp/rdp_file.c +++ b/plugins/rdp/rdp_file.c @@ -283,25 +283,15 @@ gboolean remmina_rdp_file_export(RemminaFilePlugin *plugin, RemminaFile *remmina { TRACE_CALL(__func__); FILE *fp; - gchar *p; gboolean ret; - p = strrchr(to_file, '.'); - - if (p && (g_strcmp0(p + 1, "rdp") == 0 || g_strcmp0(p + 1, "RDP") == 0)) - p = g_strdup(to_file); - else - p = g_strdup_printf("%s.rdp", to_file); - - fp = g_fopen(p, "w+"); + fp = g_fopen(to_file, "w+"); if (fp == NULL) { - g_print("Failed to export %s\n", p); - g_free(p); + g_print("Failed to export %s\n", to_file); return FALSE; } - g_free(p); ret = remmina_rdp_file_export_channel(remminafile, fp); fclose(fp); |