aboutsummaryrefslogtreecommitdiff
path: root/libsylph/folder.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-02-16 02:37:14 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-02-16 02:37:14 +0000
commit524b262d88aee12fed9252f9b8c0a6e5413d81ca (patch)
treeec962ccc62aaeebf0efcb729ff3160cbd597d008 /libsylph/folder.c
parentfbea69ffd6461e314b2a23240838ff43c7b22396 (diff)
use case insensitive match on Win32 when checking existent folders to prohibit multiple reference of folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2478 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/folder.c')
-rw-r--r--libsylph/folder.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libsylph/folder.c b/libsylph/folder.c
index 9866417c..29a3a9ee 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -649,10 +649,19 @@ FolderItem *folder_find_child_item_by_name(FolderItem *item, const gchar *name)
{
GNode *node;
FolderItem *child;
+ const gchar *base;
+
+ if (!name)
+ return NULL;
for (node = item->node->children; node != NULL; node = node->next) {
child = FOLDER_ITEM(node->data);
- if (strcmp2(g_basename(child->path), name) == 0)
+ base = g_basename(child->path);
+#ifdef G_OS_WIN32
+ if (base && g_ascii_strcasecmp(base, name) == 0)
+#else
+ if (strcmp2(base, name) == 0)
+#endif
return child;
}