From cd0daad88d1624b136a5654068e7d782f756dd3c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 25 Oct 2002 01:26:37 +0000 Subject: Use the mode 0666 when creating a new file and let the user's umask handle 2002-10-24 Jeffrey Stedfast * mail-display.c (write_data_to_file): Use the mode 0666 when creating a new file and let the user's umask handle permissions. * folder-browser.c (message_list_drag_data_get): When using open() with the O_CREAT flag, we need to pass a mode argument. Also use O_EXCL. svn path=/trunk/; revision=18430 --- mail/mail-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/mail-display.c') diff --git a/mail/mail-display.c b/mail/mail-display.c index a02d323920..df71ddb368 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -180,7 +180,7 @@ write_data_to_file (CamelMimePart *part, const char *name, gboolean unique) g_return_val_if_fail (CAMEL_IS_MIME_PART (part), FALSE); - fd = open (name, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + fd = open (name, O_WRONLY | O_CREAT | O_EXCL, 0666); if (fd == -1 && errno == EEXIST && !unique) { GtkWidget *dlg; GtkWidget *text; -- cgit v1.2.3