return
strcmp(name, ".") == 0 ||
strcmp(name, "..") == 0 ||
- (ignore_dotfiles && name[0] == '.');
+ (ignore_dotfiles && name[0] == '.' && name[1] != '/');
}
/**********************************************************************/
f2->name,
strerror(errno));
}
+
exit(EXIT_FAILURE);
}
}
/**********************************************************************/
-struct file_node *scan_directory(struct file_node *tail,
- const char *name) {
+struct file_node *scan_directory(struct file_node *tail, const char *name) {
DIR *dir;
struct dirent *dir_e;
struct stat sb;