aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/MozDownload.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 6808c0251..d6f278940 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -50,6 +50,7 @@
#include "eel-gconf-extensions.h"
#include "ephy-prefs.h"
#include <libgnomevfs/gnome-vfs-utils.h>
+#include <glib/gi18n.h>
#include "nsIExternalHelperAppService.h"
#include "nsDirectoryServiceDefs.h"
@@ -537,14 +538,22 @@ nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceURI
static char*
GetFilePath (const char *filename)
{
- char *path, *download_dir, *expanded;
+ char *path, *download_dir, *expanded, *tmp;
download_dir = eel_gconf_get_string (CONF_STATE_DOWNLOAD_DIR);
+
if (!download_dir)
{
/* Emergency download destination */
download_dir = g_strdup (g_get_home_dir ());
}
+ else if (g_utf8_collate (download_dir, "Downloads") == 0)
+ {
+ tmp = g_build_filename (g_get_home_dir (), "Desktop",
+ _("Downloads"), NULL);
+ g_free (download_dir);
+ download_dir = tmp;
+ }
expanded = gnome_vfs_expand_initial_tilde (download_dir);
path = g_build_filename (expanded, filename, NULL);