aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--libsylph/folder.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 56fc9621..bca8c1ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-16
+
+ * libsylph/folder.c: folder_find_child_item_by_name(): use case
+ insensitive match on Win32 to prohibit multiple reference of folder.
+
2010-02-15
* src/query_search.c: row_activated(): fixed a bug that 'Getting
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;
}