Commit 4eef6173 4eef617307ea0f89d35b0269388b37263231783f by Jakob Kaivo

don't list INBOX twice for virtual users

1 parent 7a622985
......@@ -203,7 +203,8 @@ list_file (const char *cwd, const char *ref, const char *pattern,
/* Skip "", ".", and "..". "" is returned by at least one buggy
implementation: Solaris 2.4 readdir on NFS filesystems. */
char const *entry = dp->d_name;
if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0')
if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0' &&
!(is_virtual && !strcmp (entry, "INBOX") && !strcmp(cwd, homedir)))
{
int status = match (entry, pattern, delim);
if (status)
......