Changeset 2465

Show
Ignore:
Timestamp:
07/12/07 11:56:27
Author:
murrayc
Message:

2007-07-12 Murray Cumming <murrayc@murrayc.com>

        • libtinymail-camel/tny-camel-account.c:

(tny_camel_account_matches_url_string_default): For maildir accounts,
compare their paths before the # marker for the folder, to avoid
considering all maildir accounts to be the same account.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2462 r2465  
     12007-07-12  Murray Cumming  <murrayc@murrayc.com> 
     2 
     3        * libtinymail-camel/tny-camel-account.c: 
     4        (tny_camel_account_matches_url_string_default): For maildir accounts,  
     5        compare their paths before the # marker for the folder, to avoid  
     6        considering all maildir accounts to be the same account. 
     7 
    182007-07-11  Armin Burgmeier  <armin@openismus.com> 
    29 
  • trunk/libtinymail-camel/tny-camel-account.c

    r2453 r2465  
    229229        if (in && org && in->port != 0 && (org->port != in->port)) 
    230230                retval = FALSE; 
     231 
     232        /* For local maildir accounts, compare their paths, before the folder part. */ 
     233        if (in->path && org->path && (strcmp (in->protocol, "maildir") == 0)) { 
     234                gchar *in_path = NULL; 
     235                gchar *in_pos_hash = NULL; 
     236                gchar *org_path = NULL; 
     237                gchar *org_pos_hash = NULL; 
     238 
     239                /* The folders have a # before them: */ 
     240                /* Copy the paths and set null-termination at the #: */ 
     241                in_path = g_strdup (in->path); 
     242                in_pos_hash = strchr (in_path, '#'); 
     243                if (in_pos_hash) 
     244                        *in_pos_hash = '\0'; 
     245 
     246                org_path = g_strdup (org->path); 
     247                org_pos_hash = strchr (org_path, '#'); 
     248                if (org_pos_hash) 
     249                        *org_pos_hash = '\0'; 
     250 
     251                if (strcmp (in_path, org_path) != 0) 
     252                        retval = FALSE; 
     253 
     254                g_free (in_path); 
     255                g_free (org_path); 
     256        } 
    231257 
    232258        if (org)