return 0;
}
+static notmuch_bool_t
+_special_directory (const char *entry)
+{
+ return strcmp (entry, ".") == 0 || strcmp (entry, "..") == 0;
+}
+
/* Test if the file/directory is to be ignored.
*/
static notmuch_bool_t
* Also ignore the .notmuch directory and any "tmp" directory
* that appears within a maildir.
*/
- if (strcmp (entry->d_name, ".") == 0 ||
- strcmp (entry->d_name, "..") == 0 ||
+ if (_special_directory (entry->d_name) ||
(is_maildir && strcmp (entry->d_name, "tmp") == 0) ||
strcmp (entry->d_name, ".notmuch") == 0)
continue;
/* Ignore special directories to avoid infinite recursion.
* Also ignore the .notmuch directory.
*/
- if (strcmp (entry->d_name, ".") == 0 ||
- strcmp (entry->d_name, "..") == 0 ||
+ if (_special_directory (entry->d_name) ||
strcmp (entry->d_name, ".notmuch") == 0)
continue;