diff options
author | Michael Catanzaro <mcatanzaro@redhat.com> | 2023-05-17 21:40:33 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@redhat.com> | 2023-05-17 21:42:11 -0500 |
commit | 40cb1bad00a8d450fa15b211d24d0ed57dbd9574 (patch) | |
tree | 8591787fc4031299675e5340665f901c7a3a0f9a | |
parent | 47f410d9a76ebd39eda4a348b0f5c4b4c59caf8d (diff) | |
download | epiphany-mcatanzaro/#1989-pt2.tar.gz |
Don't use a temp filename for downloaded web app iconmcatanzaro/#1989-pt2
Using a random filename is overkill here. Without the filename intact,
GTK impressively fails to detect the content type of PNG images (no,
really, it's really relying on only the filename) and we wind up falling
back to just the favicon.
Related: #1989
-rw-r--r-- | src/window-commands.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index 7e8b38bb2..6e2b5df75 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1687,7 +1687,6 @@ static void download_icon_and_set_image (EphyApplicationDialogData *data) { g_autofree char *destination = NULL; - g_autofree char *tmp_filename = NULL; EphyEmbedShell *shell = ephy_embed_shell_get_default (); data->download = webkit_network_session_download_uri (ephy_embed_shell_get_network_session (shell), @@ -1700,8 +1699,7 @@ download_icon_and_set_image (EphyApplicationDialogData *data) * instead of using this workaround. */ g_object_set_data (G_OBJECT (data->download), "ephy-download-set", GINT_TO_POINTER (TRUE)); - tmp_filename = ephy_file_tmp_filename (".ephy-download-XXXXXX", NULL); - destination = g_build_filename (ephy_file_tmp_dir (), tmp_filename, NULL); + destination = g_build_filename (ephy_file_tmp_dir (), data->icon_href, NULL); webkit_download_set_destination (data->download, destination); g_signal_connect (data->download, "finished", |