diff options
author | 9 <NotZed@Ximian.com> | 2001-10-29 13:06:59 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-10-29 13:06:59 +0800 |
commit | 8e598e640e9cbc8fe42d5d017b4557d656f24c5b (patch) | |
tree | 38b33360f334a12623d049b5ce364731e7c12830 /camel/camel-vee-store.c | |
parent | fedf164cb97afe53eab3e3e4fcfb1765e89a61b5 (diff) | |
download | gsoc2013-evolution-8e598e640e9cbc8fe42d5d017b4557d656f24c5b.tar.gz gsoc2013-evolution-8e598e640e9cbc8fe42d5d017b4557d656f24c5b.tar.zst gsoc2013-evolution-8e598e640e9cbc8fe42d5d017b4557d656f24c5b.zip |
Fix the 'is this a matching subfolder or subfolder'' logic to match
2001-10-29 <NotZed@Ximian.com>
* camel-vee-store.c (build_info): Fix the 'is this a matching
subfolder or subfolder'' logic to match camel-store
get_subfolders'.
* camel-store.c (get_subfolders): Fix the 'is this a matching
folder or subfolder' logic.
svn path=/trunk/; revision=14324
Diffstat (limited to 'camel/camel-vee-store.c')
-rw-r--r-- | camel/camel-vee-store.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c index 72bde97413..e909671e36 100644 --- a/camel/camel-vee-store.c +++ b/camel/camel-vee-store.c @@ -167,11 +167,19 @@ static void build_info(char *name, CamelVeeFolder *folder, struct _build_info *data) { CamelFolderInfo *info; + int toplen, namelen; + + namelen = strlen(name); + toplen = strlen(data->top); /* check we have to include this one */ if (data->top) { if (data->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) { - if (strncmp(name, data->top, strlen(data->top) != 0)) + if (!((namelen == toplen && + strcmp(name, data->top) == 0) + || ((namelen > toplen) + && strncmp(name, data->top, toplen) == 0 + && name[toplen] == '/'))) return; } else { if (strcmp(name, data->top)) |