aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-08 04:32:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-08 04:32:27 +0800
commit35bb85fdf67039394e1dc20ac7d09fdaaa805c54 (patch)
treea7424bde6d1a63b35c2c5d227dc953594dc3d289
parent03baf85a6a3d42573bee99adcad5ca919cd63659 (diff)
downloadgsoc2013-evolution-35bb85fdf67039394e1dc20ac7d09fdaaa805c54.tar.gz
gsoc2013-evolution-35bb85fdf67039394e1dc20ac7d09fdaaa805c54.tar.zst
gsoc2013-evolution-35bb85fdf67039394e1dc20ac7d09fdaaa805c54.zip
If we are trying to get a subfolder listing of the root folder, always
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): If we are trying to get a subfolder listing of the root folder, always make sure INBOX is there... * providers/imap/camel-imap-utils.c (imap_parse_list_response): Check for NIL as a directory separator. svn path=/trunk/; revision=4582
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/providers/imap/camel-imap-folder.c23
-rw-r--r--camel/providers/imap/camel-imap-utils.c10
3 files changed, 33 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 035ee3651e..63ee2758fd 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,15 @@
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
+ * providers/imap/camel-imap-folder.c
+ (imap_get_subfolder_names_internal): If we are trying to get a
+ subfolder listing of the root folder, always make sure INBOX is
+ there...
+
+ * providers/imap/camel-imap-utils.c (imap_parse_list_response):
+ Check for NIL as a directory separator.
+
+2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
+
* providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
all \n's from the expression
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index ca99da671c..82d133b0ab 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -734,6 +734,7 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
CamelStore *store = CAMEL_STORE (folder->parent_store);
CamelURL *url = CAMEL_SERVICE (store)->url;
GPtrArray *listing;
+ gboolean found_inbox = FALSE;
gint status;
gchar *result, *namespace, *dir_sep;
@@ -776,17 +777,17 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
char *ptr = result;
while (ptr && *ptr == '*') {
- gchar *flags, *sep, *folder, *buf, *end;
+ gchar *flags, *sep, *dir, *buf, *end;
for (end = ptr; *end && *end != '\n'; end++);
buf = g_strndup (ptr, (gint)(end - ptr));
ptr = end;
- if (!imap_parse_list_response (buf, namespace, &flags, &sep, &folder)) {
+ if (!imap_parse_list_response (buf, namespace, &flags, &sep, &dir)) {
g_free (buf);
g_free (flags);
g_free (sep);
- g_free (folder);
+ g_free (dir);
if (*ptr == '\n')
ptr++;
@@ -797,9 +798,12 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
g_free (buf);
g_free (flags);
- d(fprintf (stderr, "adding folder: %s\n", folder));
-
- g_ptr_array_add (listing, folder);
+ if (*dir) {
+ d(fprintf (stderr, "adding folder: %s\n", dir));
+ if (!strcmp (dir, "INBOX"))
+ found_inbox = TRUE;
+ g_ptr_array_add (listing, dir);
+ }
g_free (sep);
@@ -807,9 +811,14 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
ptr++;
}
}
+
+ if (!strcmp (folder->name, namespace) && !found_inbox) {
+ g_ptr_array_add (listing, "INBOX");
+ }
+
g_free (result);
g_free (namespace);
-
+
imap_folder->lsub = listing;
return listing;
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index f1c4c17782..3378758a69 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -94,9 +94,13 @@ imap_parse_list_response (char *buf, char *namespace, char **flags, char **sep,
/* get the directory separator */
word = imap_next_word (ep);
if (*word) {
- for (ep = word; *ep && *ep != ' '; ep++);
- *sep = g_strndup (word, (gint)(ep - word));
- string_unquote (*sep);
+ if (!strncmp (word, "NIL", 3)) {
+ *sep = NULL;
+ } else {
+ for (ep = word; *ep && *ep != ' '; ep++);
+ *sep = g_strndup (word, (gint)(ep - word));
+ string_unquote (*sep);
+ }
} else {
return FALSE;
}
s='commitgraph'>* net-p2p/btsync: 2.2.6 -> 2.3.1pi2016-02-032-5/+5 * - Fix build (Lazarus was updated to 1.6RC2)acm2016-01-281-2/+2 * Update to upstream version 0.9.2.7riggs2016-01-254-22/+67 * Bump versions to chase Nettle shared library updatejohans2016-01-241-1/+1 * Update to upstream release 0.11.2riggs2016-01-243-35/+3 * net-p2p/sonarr: Update to 2.0.0.3732feld2016-01-182-4/+4 * - Update to version 5.7.0.0pawel2016-01-142-3/+4 * Convert LICENSE= "GPLxx # or later" to "GPLxx+"amdmi32016-01-135-5/+5 * Remove deprecated PLIST_DIRSTRYpawel2016-01-101-1/+0 * net-p2p/sonarr: Fix $sonarr_data_dir creationfeld2016-01-083-4/+11 * - Add options helpermiwi2016-01-071-1/+4 * - Switch to options helpersamdmi32016-01-061-11/+10 * - Add NO_ARCHamdmi32016-01-051-0/+5 * net-p2p/sonarr: Add curl as a dependencyfeld2016-01-051-1/+2 * - Add LICENSEamdmi32016-01-021-1/+3 * net-p2p/sonarr: Various improvementsfeld2015-12-312-2/+6 * - Switch to options helpersamdmi32015-12-301-4/+2 * - Add LICENSEamdmi32015-12-301-3/+8 * Cleanup GH_* and variables order.mat2015-12-291-2/+0 * Upgrade to v0.9.34.thierry2015-12-263-30/+4 * - Reset maintainer to ports@wen2015-12-221-1/+1 * net-p2p/transmission-remote-gui: Unbreak after FPC upgrade to 3.0.0marino2015-12-221-2/+3 * net-p2p/sonarr: Update to 2.0.0.3645feld2015-12-173-5/+5 * net-p2p/sonarr: no-op improvementsfeld2015-12-171-5/+2 * Add net-p2p/sonarr to the ports treefeld2015-12-176-0/+219 * Upgrade to 0.3.1.vanilla2015-12-082-3/+3 * - Pass maintainership to submittermiwi2015-11-301-1/+1 * - Update to version 1.1.6 [1]pawel2015-11-252-7/+4 * - Update LICENSEsunpoet2015-11-215-25/+28 * - Update LICENSEsunpoet2015-11-215-38/+34 * devel/py-asn1: move to devel/py-pyasn1 to match PyPI namerm2015-11-191-2/+2 * - Update to 2.2.6wen2015-11-122-5/+5 * - Switch to options helpersamdmi32015-11-061-4/+5 * Fix ports that confused the meaning of WRKDIR and WRKSRC.mat2015-11-052-2/+2 * Upgrade to 0.9.31: back-ported utp vulnerability fix fromthierry2015-10-273-3/+29 * - Fix shebang properlyamdmi32015-10-271-0/+2 * Add regenerated patch.bar2015-10-241-3/+2 * - Change security/cryptopp from BUILD_DEPENDS to LIB_DEPENDS as it defaults t...bar2015-10-245-18/+27 * - fix API for miniupnpc-1.9.20151008dinoex2015-10-152-1/+14 * net-p2p/bitcoin: chase r399209jbeich2015-10-143-0/+33 * net-p2p/transmission-cli: chase r399209jbeich2015-10-145-4/+22 * Update to 1.1.5mat2015-10-142-3/+3 * - Update to 0.9.6novel2015-10-134-10/+6 * - Update to 0.13.6novel2015-10-134-8/+7 * net-p2p/btsync: update 1.4.111 -> 2.2.0junovitch2015-10-112-7/+8 * Remove iconv(), iconv_open() and iconv_close() symbols from libiconv.tijl2015-10-101-1/+7 * Remove trailing whitespace from Makefiles, M-X.olgeni2015-10-083-3/+3 * - cleanupdinoex2015-10-081-2/+0 * Convert my ports to USES=localbasejbeich2015-09-271-3/+2 * Convert update-mime-database into @post*bapt2015-09-262-4/+4 * Mark as x86-specific: does not support big-endian architectures.linimon2015-09-262-0/+6 * net-p2p/gtk-gnutella: update to 1.1.4 [1]jbeich2015-09-233-14/+8 * net-p2p/deluge: update to 1.3.12rm2015-09-224-89/+36 * Typos, whitespace and capitalization fixes (G-P).olgeni2015-09-212-2/+2 * Remove ansi version fo wxGTK 2.8 and only keep the unicode versionbapt2015-09-173-9/+6 * Make it so that the default Perl is always called perl5.mat2015-09-142-3/+3 * Mark as only working with the old wxGTK versionbapt2015-09-141-1/+1 * Enforce unicode version of wxGTKbapt2015-09-141-8/+5 * net-p2p/libtorrent-rasterbar: fix use of libiconv for non-ascii file downloadpi2015-09-051-1/+1 * net-p2p/namecoin: fix for upcoming FORTIFY_SOURCEpi2015-09-022-0/+24 * - Switch to options helpersamdmi32015-09-023-12/+7 * net-p2p/transmission-*: minor cleanupjbeich2015-08-302-13/+6 * - Add LICENSEsunpoet2015-08-251-9/+10 * - Add LICENSEamdmi32015-08-251-1/+5 * - Add LICENSEamdmi32015-08-241-20/+8 * - Update The Glorious Glasgow Haskell Compiler to version 7.10.2pgj2015-08-214-0/+21 * - Add LICENSEamdmi32015-08-211-0/+4 * - Add NO_ARCHamdmi32015-08-211-0/+1 * Update to version 5.6.2.0pawel2015-08-202-3/+3 * Reset maintainererwin2015-08-191-1/+1 * Reset maintainererwin2015-08-192-2/+2 * Upgrade libtorrent-rasterbar to 1.0.6 and qbittorrent -- to 3.2.3.mi2015-08-195-31/+20 * - Fix buildacm2015-08-191-2/+2 * net-p2p/zetacoin{-no11}: mark broken on armv6pgollucci2015-08-142-1/+3 * net-p2p/zetacoin: mark broken on armv6pgollucci2015-08-121-0/+2 * net-p2p/dogecoin: update to 1.8.2swills2015-08-102-3/+3 * - editors/lazarus update to 1.4.2acm2015-08-091-12/+4 * Remove expired ports:rene2015-08-086-288/+0 * net-p2p/litecoin: Fix .desktop fileswills2015-08-051-1/+3 * net-p2p/litecoin: Update to 0.10.2.2swills2015-08-0510-132/+144 * Cleanup some abusive use of GH_TAGNAME.mat2015-08-042-4/+3 * Upgrade to 0.9.30 (random listening port).thierry2015-08-042-4/+3 * Part 1 of adding USE_GNOME=intltool to ports that require it.kwm2015-08-031-1/+1 * Remove expired ports:rene2015-08-016-529/+0 * net-p2p/bitcoin: 0.10.2 -> 0.11.0pgollucci2015-07-173-6/+6 * net-p2p/zetacoin: cleanuppgollucci2015-07-163-8/+5 * net-p2p/digitalcoin: cleanuppgollucci2015-07-164-18/+27 * net-p2p/verlihub-plugins:pgollucci2015-07-161-5/+1 * net-p2p/py-kenosis: Mark DEPRECATED as fails to run with modern pythonbofh2015-07-07