changeset 4119:162d643ee89b HEAD

Hide also "." and ".." when listing mboxes
author Timo Sirainen <tss@iki.fi>
date Sat, 01 Apr 2006 13:44:10 +0300
parents b66da5c1a94b
children c9afd13cf2d5
files src/lib-storage/index/mbox/mbox-list.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-list.c	Sat Apr 01 12:57:55 2006 +0300
+++ b/src/lib-storage/index/mbox/mbox-list.c	Sat Apr 01 13:44:10 2006 +0300
@@ -223,9 +223,11 @@
 	int ret;
 	bool noselect;
 
-	/* skip subscription file and .imap/ directory */
+	/* skip ., .., subscription file and .imap/ directory */
 	if (fname[0] == '.' &&
-	    (strcmp(fname, SUBSCRIPTION_FILE_NAME) == 0 ||
+	    (fname[1] == '\0' ||
+	     (fname[1] == '.' && fname[2] == '\0') ||
+	     strcmp(fname, SUBSCRIPTION_FILE_NAME) == 0 ||
 	     strcmp(fname, MBOX_INDEX_DIR_NAME) == 0))
 		return 0;