aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--ChangeLog.ja2
-rw-r--r--libsylph/folder.c11
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 976ae968..df245914 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2005-12-09
* src/foldersel.c: also select top folder on FOLDER_SEL_ALL.
+ * libsylph/folder.c: folder_find_item_from_identifier(): also return
+ top folder.
2005-12-09
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 8c38033d..00ca7594 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -2,6 +2,8 @@
* src/foldersel.c: FOLDER_SEL_ALL でトップフォルダも選択するように
した。
+ * libsylph/folder.c: folder_find_item_from_identifier(): トップフォルダ
+ も返すようにした。
2005-12-09
diff --git a/libsylph/folder.c b/libsylph/folder.c
index cb84c8ca..257f57c8 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -705,15 +705,18 @@ FolderItem *folder_find_item_from_identifier(const gchar *identifier)
name = p;
p = strchr(p, '/');
- if (!p)
- return folder_find_item_from_path(identifier);
- *p = '\0';
- p++;
+ if (p) {
+ *p = '\0';
+ p++;
+ }
folder = folder_find_from_name(name, type);
if (!folder)
return folder_find_item_from_path(identifier);
+ if (!p)
+ return FOLDER_ITEM(folder->node->data);
+
path = p;
d[0] = (gpointer)path;