aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>2000-01-04 06:40:54 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-01-04 06:40:54 +0800
commitc1d59fcb62563f31b5f753fa90b5c7bd2baa5fed (patch)
tree57a35f02b38b600eab3a706152d294072e170451 /camel/providers/mbox
parent01c8e48720676af9576b5eee0c3081432d61b133 (diff)
downloadgsoc2013-evolution-c1d59fcb62563f31b5f753fa90b5c7bd2baa5fed.tar.gz
gsoc2013-evolution-c1d59fcb62563f31b5f753fa90b5c7bd2baa5fed.tar.zst
gsoc2013-evolution-c1d59fcb62563f31b5f753fa90b5c7bd2baa5fed.zip
detects netscape ".sdb" folders as well as simple non-suffixed folders (as
2000-01-03 bertrand <Bertrand.Guiheneuf@aful.org> * camel/providers/mbox/camel-mbox-folder.c (_list_subfolders): detects netscape ".sdb" folders as well as simple non-suffixed folders (as the ones used in pine). * camel/string-utils.c (string_prefix): finished implementation. (string_prefix): added a boolean flag to indicate if the suffix has been found. When the suffix does not match, return NULL. svn path=/trunk/; revision=1531
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 90d9399833..44d2ec8913 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -34,7 +34,7 @@
#include "camel-mbox-folder.h"
#include "camel-mbox-store.h"
-#include "gstring-util.h"
+#include "string-utils.h"
#include "camel-log.h"
#include "camel-stream-buffered-fs.h"
#include "camel-folder-summary.h"
@@ -641,10 +641,13 @@ _list_subfolders (CamelFolder *folder, CamelException *ex)
GList *file_list;
gchar *entry_name;
gchar *full_entry_name;
+ gchar *real_folder_name;
struct dirent *dir_entry;
DIR *dir_handle;
+ gboolean folder_suffix_found;
gchar *io_error_text;
+
/* check if the folder object exists */
@@ -697,8 +700,17 @@ _list_subfolders (CamelFolder *folder, CamelException *ex)
if (entry_name[0] != '.') {
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::list_subfolders adding "
"%s\n", entry_name);
+
+ /* if the folder is a netscape folder, remove the
+ ".sdb" from the name */
+ real_folder_name = string_prefix (entry_name, ".sdb", &folder_suffix_found);
+ /* stick here the tests for other folder suffixes if any */
+
+ if (!folder_suffix_found) real_folder_name = g_strdup (entry_name);
+
+ /* add the folder name to the list */
subfolder_name_list = g_list_append (subfolder_name_list,
- g_strdup (entry_name));
+ real_folder_name);
}
}
/* read next entry */