aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyHeaderSniffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyHeaderSniffer.cpp')
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp
index 1a14fe962..f2ac46543 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -204,18 +204,18 @@ filechooser_response_cb (EphyFileChooser *dialog, gint response, EphyHeaderSniff
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
- LOG ("Filename %s", filename)
+ if (ephy_gui_confirm_overwrite_file (parent, filename) == FALSE)
+ {
+ g_free (filename);
+ return;
+ }
- if (filename &&
- ephy_gui_confirm_overwrite_file (parent, filename) == TRUE)
+ nsCOMPtr<nsILocalFile> destFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID);
+ if (destFile)
{
- nsCOMPtr<nsILocalFile> destFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID);
- if (destFile)
- {
- destFile->InitWithNativePath (nsDependentCString (filename));
-
- sniffer->InitiateDownload (destFile);
- }
+ destFile->InitWithNativePath (nsDependentCString (filename));
+
+ sniffer->InitiateDownload (destFile);
}
g_free (filename);