[epiphany/mcatanzaro/#1733: 14/18] Fix last download directory setting
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#1733: 14/18] Fix last download directory setting
- Date: Tue, 5 Apr 2022 20:26:37 +0000 (UTC)
commit 7e9df2fe51a0dc0e6d353753d11869f4a96dd2a6
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Thu Mar 24 15:37:21 2022 -0500
Fix last download directory setting
We've mixed up URIs and paths and are saving messed up values like
"/home/mcatanzaro/file:/home/mcatanzaro/Downloads" into this setting.
Oops. The setting is supposed to be a path. Fix it.
Fixes #1733
embed/ephy-download.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index ca81083c3..1d3b2d552 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -760,18 +760,18 @@ filename_suggested_dialog_cb (GtkDialog *dialog,
SuggestedFilenameData *data)
{
if (response == GTK_RESPONSE_OK) {
- g_autofree gchar *uri = g_file_get_path (data->directory);
- g_autofree gchar *folder = g_file_get_uri (data->directory);
- g_autofree gchar *path = g_build_filename (uri, data->suggested_filename, NULL);
+ g_autofree gchar *folder_path = g_file_get_path (data->directory);
+ g_autofree gchar *folder_uri = g_file_get_uri (data->directory);
+ g_autofree gchar *download_uri = g_build_filename (folder_uri, data->suggested_filename, NULL);
- ephy_download_set_destination_uri (data->download, path);
+ ephy_download_set_destination_uri (data->download, download_uri);
webkit_download_set_allow_overwrite (data->webkit_download, TRUE);
ephy_downloads_manager_add_download (ephy_embed_shell_get_downloads_manager
(ephy_embed_shell_get_default ()),
data->download);
- g_settings_set_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY, folder);
+ g_settings_set_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY, folder_path);
} else {
ephy_download_cancel (data->download);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]