aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/e-attachment-handler-image.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c
index 6429eb6b8e..d9d87d991f 100644
--- a/widgets/misc/e-attachment-handler-image.c
+++ b/widgets/misc/e-attachment-handler-image.c
@@ -115,6 +115,7 @@ action_image_set_as_background_cb (GtkAction *action,
EAttachment *attachment;
GFile *destination;
GList *selected;
+ const gchar *override;
gchar *path;
view = e_attachment_handler_get_view (handler);
@@ -123,8 +124,12 @@ action_image_set_as_background_cb (GtkAction *action,
attachment = E_ATTACHMENT (selected->data);
/* Save the image under ~/.gnome2/wallpapers/. */
- path = g_build_filename (
- g_get_home_dir (), ".gnome2", "wallpapers", NULL);
+ override = g_getenv ("GNOME22_USER_DIR");
+ if (override != NULL)
+ path = g_build_filename (override, "wallpapers", NULL);
+ else
+ path = g_build_filename (
+ g_get_home_dir (), ".gnome2", "wallpapers", NULL);
destination = g_file_new_for_path (path);
g_mkdir_with_parents (path, 0755);
g_free (path);