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/folder-browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/folder-browser.c') diff --git a/mail/folder-browser.c b/mail/folder-browser.c index ab9a00d66c..151e6991ad 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -330,7 +330,7 @@ message_list_drag_data_get (ETree *tree, int row, ETreePath path, int col, uri_list = g_strdup_printf ("file://%s/%s", tmpdir, filename); - fd = open (uri_list + 7, O_WRONLY | O_CREAT); + fd = open (uri_list + 7, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd == -1) { /* cleanup and abort */ camel_object_unref (CAMEL_OBJECT (message)); -- cgit v1.2.3