~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to camel/providers/local/camel-mh-folder.c

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
{
50
50
        CamelLocalFolder *lf = (CamelLocalFolder *) folder;
51
51
 
52
 
        return g_strdup_printf("%s/%s", lf->folder_path, uid);
 
52
        return g_strdup_printf ("%s/%s", lf->folder_path, uid);
53
53
}
54
54
 
55
55
static gboolean
68
68
 
69
69
        /* FIXME: probably needs additional locking (although mh doesn't appear do do it) */
70
70
 
71
 
        d(printf("Appending message\n"));
 
71
        d (printf ("Appending message\n"));
72
72
 
73
73
        /* If we can't lock, don't do anything */
74
74
        if (!lf || camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
85
85
                camel_message_info_set_flags (mi, CAMEL_MESSAGE_ATTACHMENTS, has_attachment ? CAMEL_MESSAGE_ATTACHMENTS : 0);
86
86
        }
87
87
 
88
 
        d(printf("Appending message: uid is %s\n", camel_message_info_uid(mi)));
 
88
        d (printf ("Appending message: uid is %s\n", camel_message_info_uid (mi)));
89
89
 
90
90
        /* write it out, use the uid we got from the summary */
91
 
        name = g_strdup_printf("%s/%s", lf->folder_path, camel_message_info_uid(mi));
 
91
        name = g_strdup_printf ("%s/%s", lf->folder_path, camel_message_info_uid (mi));
92
92
        output_stream = camel_stream_fs_new_with_name (
93
93
                name, O_WRONLY | O_CREAT, 0600, error);
94
94
        if (output_stream == NULL)
112
112
 fail_write:
113
113
 
114
114
        /* remove the summary info so we are not out-of-sync with the mh folder */
115
 
        camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (folder->summary),
116
 
                                         camel_message_info_uid (mi));
 
115
        camel_folder_summary_remove (CAMEL_FOLDER_SUMMARY (folder->summary), mi);
117
116
 
118
117
        g_prefix_error (
119
118
                error, _("Cannot append message to mh folder: %s: "), name);
148
147
        CamelMessageInfo *info;
149
148
        gchar *name = NULL;
150
149
 
151
 
        d(printf("getting message: %s\n", uid));
 
150
        d (printf ("getting message: %s\n", uid));
152
151
 
153
152
        if (!lf || camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
154
153
                return NULL;
164
163
        /* we only need it to check the message exists */
165
164
        camel_message_info_free (info);
166
165
 
167
 
        name = g_strdup_printf("%s/%s", lf->folder_path, uid);
 
166
        name = g_strdup_printf ("%s/%s", lf->folder_path, uid);
168
167
        message_stream = camel_stream_fs_new_with_name (
169
168
                name, O_RDONLY, 0, error);
170
169
        if (message_stream == NULL) {
239
238
        CamelFolder *folder;
240
239
        gchar *basename;
241
240
 
242
 
        d(printf("Creating mh folder: %s\n", full_name));
 
241
        d (printf ("Creating mh folder: %s\n", full_name));
243
242
 
244
243
        basename = g_path_get_basename (full_name);
245
244