aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-23 15:59:00 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-23 15:59:00 +0800
commitc09e79bbf4b00ae5992456ff9e3dead1ee8efcb7 (patch)
tree18cabb8ea8d5cebadcf36dae12bf37a9a9390d98 /widgets
parentf14ab0afa345a49816beb215a1b3e2042c13ec40 (diff)
downloadgsoc2013-evolution-c09e79bbf4b00ae5992456ff9e3dead1ee8efcb7.tar.gz
gsoc2013-evolution-c09e79bbf4b00ae5992456ff9e3dead1ee8efcb7.tar.zst
gsoc2013-evolution-c09e79bbf4b00ae5992456ff9e3dead1ee8efcb7.zip
** Fixes bug #347238
svn path=/trunk/; revision=32636
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-attachment-bar.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index b0eba3ff6c..6b3ad957f8 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-07 Ushveen Kaur <kushveen@novell.com>
+
+ ** Fix for bug #347238
+
+ * e-attachment-bar.c: Changed the file permission changed to 644
+ while saving the attachment.
+
2006-08-21 Li Yuan <li.yuan@sun.com>
** Fixes bug #348753
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 4b67ba21ec..708a365549 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -705,7 +705,7 @@ destroy (GtkObject *object)
}
static char *
-temp_save_part (CamelMimePart *part)
+temp_save_part (CamelMimePart *part, gboolean readonly)
{
const char *filename;
char *tmpdir, *path, *mfilename = NULL, *utf8_mfilename = NULL;
@@ -731,7 +731,10 @@ temp_save_part (CamelMimePart *part)
g_free (mfilename);
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- stream = camel_stream_fs_new_with_name (path, O_RDWR|O_CREAT|O_TRUNC, 0600);
+ if (readonly)
+ stream = camel_stream_fs_new_with_name (path, O_RDWR|O_CREAT|O_TRUNC, 0444);
+ else
+ stream = camel_stream_fs_new_with_name (path, O_RDWR|O_CREAT|O_TRUNC, 0644);
if (!stream) {
/* TODO handle error conditions */
@@ -787,7 +790,7 @@ eab_drag_data_get(EAttachmentBar *bar, GdkDragContext *drag, GtkSelectionData *d
}
/* If we are not able to save, ignore it */
- if (!(path = temp_save_part (attachment->body)))
+ if (!(path = temp_save_part (attachment->body, FALSE)))
continue;
url = camel_url_new ("file://", NULL);
@@ -902,7 +905,7 @@ eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy)
/* Check if the file is stored already */
if (!attachment->store_uri) {
- path = temp_save_part (attachment->body);
+ path = temp_save_part (attachment->body, TRUE);
url = camel_url_new ("file://", NULL);
camel_url_set_path (url, path);
attachment->store_uri = camel_url_to_string (url, 0);