From 0c962f1c0fabf85606069ab40c7b943a28c61abd Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Thu, 18 Mar 2010 20:25:42 +0100 Subject: [PATCH] Now do not ignore ./something when the -d option is present. --- finddup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/finddup.c b/finddup.c index bf59852..aa16dac 100644 --- a/finddup.c +++ b/finddup.c @@ -90,7 +90,7 @@ int ignore_entry(const char *name) { return strcmp(name, ".") == 0 || strcmp(name, "..") == 0 || - (ignore_dotfiles && name[0] == '.'); + (ignore_dotfiles && name[0] == '.' && name[1] != '/'); } /**********************************************************************/ @@ -176,6 +176,7 @@ int same_content(struct file_node *f1, struct file_node *f2, f2->name, strerror(errno)); } + exit(EXIT_FAILURE); } } @@ -190,8 +191,7 @@ int same_files(struct file_node *f1, struct file_node *f2, /**********************************************************************/ -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; -- 2.20.1