# HG changeset patch # User zas_ # Date 1208213153 0 # Node ID 822040a51249dbf50eb289d10f2453f723c4519e # Parent 96fb24f948b7e11c3615678fbc76a119e21911b9 Increase collection_load() buffer size and do not activate error limiting for GQview collections. diff -r 96fb24f948b7 -r 822040a51249 src/collect-io.c --- a/src/collect-io.c Mon Apr 14 22:28:29 2008 +0000 +++ b/src/collect-io.c Mon Apr 14 22:45:53 2008 +0000 @@ -26,6 +26,7 @@ #define GQ_COLLECTION_FAIL_MIN 300 #define GQ_COLLECTION_FAIL_PERCENT 98 +#define GQ_COLLECTION_READ_BUFSIZE 4096 typedef struct _CollectManagerEntry CollectManagerEntry; @@ -53,7 +54,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, CollectionLoadFlags flags) { - gchar s_buf[2048]; + gchar s_buf[GQ_COLLECTION_READ_BUFSIZE]; FILE *f; gchar *pathl; gint official = FALSE; @@ -85,6 +86,9 @@ if (!path && !cd->path) return FALSE; if (!path) path = cd->path; + + if (debug) printf("collection load: append=%d flush=%d only_geometry=%d path=%s\n", + append, flush, only_geometry, path); /* load it */ pathl = path_from_utf8(path); @@ -120,6 +124,12 @@ return TRUE; } } + else if (strncasecmp(s_buf, "GQview collection", strlen("GQview collection")) == 0) + { + /* As 2008/04/15 there is no difference between our collection file format + * and GQview 2.1.5 collection file format so ignore failures as well. */ + official = TRUE; + } continue; } if (s_buf[0]=='\n') continue;