From 3bd58106efb22b78e6fbabe9307880338ae92746 Mon Sep 17 00:00:00 2001 From: bertrand Date: Wed, 9 Feb 2000 20:35:35 +0000 Subject: various typo fixes in the ctree construction. 2000-02-09 bertrand * tests/ui-tests/message-browser.c: various typo fixes in the ctree construction. * camel/string-utils.c (string_trim): fix braindead trailing trim bug. * camel/gmime-content-field.c (gmime_content_field_construct_from_string): strip the leading and trailing quotes when constructing the content field. This should be done in a more generic RFC822 approach, but this fixes a bug that prevent matt from analysing some multipart messages. * camel/camel-data-wrapper.h: reorganize the deprecated and new methods. * camel/providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): Use "From " as the message separating string. * camel/providers/mbox/camel-mbox-folder.c (_append_message): set the mode when creating the mbox file. * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): ditto * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): ditto svn path=/trunk/; revision=1711 --- camel/providers/mbox/camel-mbox-folder.c | 7 +++++-- camel/providers/mbox/camel-mbox-summary.c | 4 +++- camel/providers/mbox/camel-mbox-utils.c | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c index 87456ac0fe..53da87b746 100644 --- a/camel/providers/mbox/camel-mbox-folder.c +++ b/camel/providers/mbox/camel-mbox-folder.c @@ -242,7 +242,7 @@ _check_get_or_maybe_generate_summary_file (CamelMboxFolder *mbox_folder, CamelEx mbox_file_fd = open (mbox_folder->folder_file_path, O_RDONLY); message_info_array = camel_mbox_parse_file (mbox_file_fd, - "From - ", + "From ", 0, &file_size, &next_uid, @@ -981,7 +981,10 @@ _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException /* append the temporary file message to the mbox file */ fd1 = open (tmp_message_filename, O_RDONLY); - fd2 = open (mbox_folder->folder_file_path, O_WRONLY | O_CREAT | O_APPEND); + fd2 = open (mbox_folder->folder_file_path, + O_WRONLY | O_CREAT | O_APPEND, + S_IRUSR | S_IWUSR); + if (fd2 == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION, diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c index 094d032cb3..244fe34073 100644 --- a/camel/providers/mbox/camel-mbox-summary.c +++ b/camel/providers/mbox/camel-mbox-summary.c @@ -51,7 +51,9 @@ camel_mbox_save_summary (CamelMboxSummary *summary, const gchar *filename, Camel CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::save_summary entering \n"); - fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC); + fd = open (filename, + O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR); if (fd == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION, diff --git a/camel/providers/mbox/camel-mbox-utils.c b/camel/providers/mbox/camel-mbox-utils.c index 1f0285be8a..64fb4cb283 100644 --- a/camel/providers/mbox/camel-mbox-utils.c +++ b/camel/providers/mbox/camel-mbox-utils.c @@ -233,7 +233,10 @@ camel_mbox_write_xev (gchar *mbox_file_name, tmp_file_name_secure = g_strdup_printf ("%s__.ev_tmp_secure", mbox_file_name); fd1 = open (mbox_file_name, O_RDONLY); - fd2 = open (tmp_file_name, O_WRONLY | O_CREAT | O_TRUNC ); + fd2 = open (tmp_file_name, + O_WRONLY | O_CREAT | O_TRUNC , + S_IRUSR | S_IWUSR); + if (fd2 == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION, -- cgit v1.2.3