diff options
Diffstat (limited to 'libsylph/folder.c')
-rw-r--r-- | libsylph/folder.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; |