[epiphany] Fix download failure when overwriting file



commit 2061b1ff027c1394ebfcb414dcfc903c0cd11e07
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Sep 24 21:58:07 2014 -0500

    Fix download failure when overwriting file
    
    When using e.g. Save Image As, if the user tries to save a download over
    an existing file we prompt him to confirm that he wishes to delete the
    original file. Then the download fails. Actually delete the original
    file instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737329

 src/popup-commands.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 8faaa66..675347b 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -174,11 +174,15 @@ filename_suggested_cb (EphyDownload *download,
        if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
        {
                char *uri;
+               WebKitDownload *webkit_download;
 
                uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
                ephy_download_set_destination_uri (download, uri);
                g_free (uri);
 
+               webkit_download = ephy_download_get_webkit_download (download);
+               webkit_download_set_allow_overwrite (webkit_download, TRUE);
+
                ephy_window_add_download (window, download);
        }
        else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]