projects
/
finddup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e1996bd
)
Now do not ignore ./something when the -d option is present.
author
Francois Fleuret
<francois@fleuret.org>
Thu, 18 Mar 2010 19:25:42 +0000
(20:25 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Thu, 18 Mar 2010 19:25:42 +0000
(20:25 +0100)
finddup.c
patch
|
blob
|
history
diff --git
a/finddup.c
b/finddup.c
index
bf59852
..
aa16dac
100644
(file)
--- a/
finddup.c
+++ b/
finddup.c
@@
-90,7
+90,7
@@
int ignore_entry(const char *name) {
return
strcmp(name, ".") == 0 ||
strcmp(name, "..") == 0 ||
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));
}
f2->name,
strerror(errno));
}
+
exit(EXIT_FAILURE);
}
}
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;
DIR *dir;
struct dirent *dir_e;
struct stat sb;