** Fix for bug #522433
authorMilan Crha <mcrha@redhat.com>
Fri, 4 Apr 2008 16:54:59 +0000 (16:54 +0000)
committerMilan Crha <mcrha@src.gnome.org>
Fri, 4 Apr 2008 16:54:59 +0000 (16:54 +0000)
2008-04-04  Milan Crha  <mcrha@redhat.com>

** Fix for bug #522433

* camel-spool-summary.c: (spool_summary_sync_full):
* camel-mh-summary.c: (mh_summary_next_uid_string),
(camel_mh_summary_add):
* camel-maildir-summary.c: (camel_maildir_summary_add):
* camel-mbox-folder.c: (mbox_lock):
* camel-spool-folder.c: (spool_lock): Open files with O_LARGEFILE flag.

svn path=/trunk/; revision=8618

camel/providers/local/ChangeLog
camel/providers/local/camel-maildir-summary.c
camel/providers/local/camel-mbox-folder.c
camel/providers/local/camel-mh-summary.c
camel/providers/local/camel-spool-folder.c
camel/providers/local/camel-spool-summary.c

index b6a4e11..c63be92 100644 (file)
@@ -1,3 +1,14 @@
+2008-04-04  Milan Crha  <mcrha@redhat.com>
+
+       ** Fix for bug #522433
+
+       * camel-spool-summary.c: (spool_summary_sync_full):
+       * camel-mh-summary.c: (mh_summary_next_uid_string),
+       (camel_mh_summary_add):
+       * camel-maildir-summary.c: (camel_maildir_summary_add):
+       * camel-mbox-folder.c: (mbox_lock):
+       * camel-spool-folder.c: (spool_lock): Open files with O_LARGEFILE flag.
+
 2008-01-22  Srinivasa Ragavan  <sragavan@novell.com>
 
        ** Fix for bug #450840
index 6b953ec..34201ad 100644 (file)
@@ -478,7 +478,7 @@ camel_maildir_summary_add (CamelLocalSummary *cls, const char *name, int forcein
 
        d(printf("summarising: %s\n", name));
 
-       fd = open(filename, O_RDONLY);
+       fd = open(filename, O_RDONLY|O_LARGEFILE);
        if (fd == -1) {
                g_warning ("Cannot summarise/index: %s: %s", filename, strerror (errno));
                g_free(filename);
index 479d59c..f5e9e63 100644 (file)
@@ -150,7 +150,7 @@ static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *e
        /* make sure we have matching unlocks for locks, camel-local-folder class should enforce this */
        g_assert(mf->lockfd == -1);
 
-       mf->lockfd = open(lf->folder_path, O_RDWR, 0);
+       mf->lockfd = open(lf->folder_path, O_RDWR|O_LARGEFILE, 0);
        if (mf->lockfd == -1) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
                                      _("Cannot create folder lock on %s: %s"),
index 646a13d..389d8e1 100644 (file)
@@ -152,7 +152,7 @@ static char *mh_summary_next_uid_string(CamelFolderSummary *s)
                        uid = camel_folder_summary_next_uid(s);
                        name = g_strdup_printf("%s/%u", cls->folder_path, uid);
                        /* O_EXCL isn't guaranteed, sigh.  Oh well, bad luck, mh has problems anyway */
-                       fd = open(name, O_WRONLY|O_CREAT|O_EXCL, 0600);
+                       fd = open(name, O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
                        g_free(name);
                } while (fd == -1 && errno == EEXIST);
 
@@ -174,7 +174,7 @@ static int camel_mh_summary_add(CamelLocalSummary *cls, const char *name, int fo
 
        d(printf("summarising: %s\n", name));
 
-       fd = open(filename, O_RDONLY);
+       fd = open(filename, O_RDONLY|O_LARGEFILE);
        if (fd == -1) {
                g_warning ("Cannot summarise/index: %s: %s", filename, strerror (errno));
                g_free(filename);
index 9f551b5..13e6875 100644 (file)
@@ -144,7 +144,7 @@ spool_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
        CamelMboxFolder *mf = (CamelMboxFolder *)lf;
        CamelSpoolFolder *sf = (CamelSpoolFolder *)lf;
 
-       mf->lockfd = open(lf->folder_path, O_RDWR, 0);
+       mf->lockfd = open(lf->folder_path, O_RDWR|O_LARGEFILE, 0);
        if (mf->lockfd == -1) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
                                      _("Cannot create folder lock on %s: %s"),
index a49c1fa..19d04e3 100644 (file)
@@ -139,7 +139,7 @@ spool_summary_sync_full(CamelMboxSummary *cls, gboolean expunge, CamelFolderChan
 
        camel_operation_start(NULL, _("Storing folder"));
 
-       fd = open(((CamelLocalSummary *)cls)->folder_path, O_RDWR);
+       fd = open(((CamelLocalSummary *)cls)->folder_path, O_RDWR|O_LARGEFILE);
        if (fd == -1) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
                                      _("Could not open file: %s: %s"),