aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/ContentHandler.cpp6
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 11d33c877..6601f070b 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -165,7 +165,11 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
CONF_STATE_SAVE_DIR,
EPHY_FILE_FILTER_ALL);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), defaultFile.get());
+ /* Remove leading dots */
+ const char *fname = defaultFile.get();
+ while (*fname == '.') fname++;
+
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), fname);
if (parentWindow)
{
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp
index 4b2f30424..c9fb91aa7 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -414,8 +414,12 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
EPHY_FILE_FILTER_ALL_SUPPORTED);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
+ /* Remove leading dots */
+ char *fname = filename;
+ while (*fname == '.') fname++;
+
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
- filename);
+ fname);
g_signal_connect (dialog, "response",
G_CALLBACK (filechooser_response_cb), this);