From c843f40ff3e6e28e20c3b4c68172d9e69be9885d Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 2 Jan 2005 14:10:16 +0000 Subject: Added unit tests for 'utility::path'. --- src/messaging/IMAPFolder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/messaging/IMAPFolder.cpp') diff --git a/src/messaging/IMAPFolder.cpp b/src/messaging/IMAPFolder.cpp index ce5b5236..f197f360 100644 --- a/src/messaging/IMAPFolder.cpp +++ b/src/messaging/IMAPFolder.cpp @@ -40,8 +40,8 @@ namespace messaging { IMAPFolder::IMAPFolder(const folder::path& path, IMAPStore* store, const int type, const int flags) : m_store(store), m_connection(m_store->connection()), m_path(path), - m_name(path.getLastComponent()), m_mode(-1), m_open(false), m_type(type), m_flags(flags), - m_messageCount(0), m_uidValidity(0) + m_name(path.isEmpty() ? folder::path::component("") : path.getLastComponent()), m_mode(-1), + m_open(false), m_type(type), m_flags(flags), m_messageCount(0), m_uidValidity(0) { m_store->registerFolder(this); } -- cgit v1.2.3