[epiphany] Use ephy_sanitize_filename() for filenames suggested by the server
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Use ephy_sanitize_filename() for filenames suggested by the server
- Date: Mon, 10 Sep 2012 15:05:49 +0000 (UTC)
commit 528eff9588298315490d173a40ad865f461d4e29
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Sep 10 13:17:02 2012 +0200
Use ephy_sanitize_filename() for filenames suggested by the server
Because the suggested filename returned by the server might contain
directory separators.
https://bugzilla.gnome.org/show_bug.cgi?id=683711
embed/ephy-download.c | 2 +-
src/window-commands.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 158702b..dc19b45 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -305,7 +305,7 @@ define_destination_uri (EphyDownload *download, const char *suggested_filename)
}
if (suggested_filename != NULL) {
- dest_name = g_strdup (suggested_filename);
+ dest_name = ephy_sanitize_filename (g_strdup (suggested_filename));
} else {
dest_name = ephy_file_tmp_filename ("ephy-download-XXXXXX", NULL);
}
diff --git a/src/window-commands.c b/src/window-commands.c
index 44e880c..4b4fcb2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -351,7 +351,7 @@ window_cmd_file_save_as (GtkAction *action,
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
view = ephy_embed_get_web_view (embed);
- suggested_filename = get_suggested_filename (view);
+ suggested_filename = ephy_sanitize_filename (get_suggested_filename (view));
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), suggested_filename);
g_free (suggested_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]