X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=finddup.git;a=blobdiff_plain;f=finddup.c;h=7f223136d4f3e06904e5669ffa1546c3041a6118;hp=2e4a93739bb96bc528d9a9cceb11e14ad61e02d2;hb=HEAD;hpb=c540f85c7f4ea3bf6c26a87f679f9d2a42932652 diff --git a/finddup.c b/finddup.c index 2e4a937..7d15689 100644 --- a/finddup.c +++ b/finddup.c @@ -23,9 +23,9 @@ * */ -#define VERSION_NUMBER "1.2" +#define VERSION_NUMBER "1.2.1" -#define _BSD_SOURCE +#define _DEFAULT_SOURCE #include #include @@ -337,7 +337,7 @@ void exec_command(int nb, struct file_node **nodes) { pid_t pid; for(n = 0; n < nb; n++) { - if(nodes[n]->group_id != nodes[n-1]->group_id) { + if(n > 0 && nodes[n]->group_id != nodes[n-1]->group_id) { group_size = 0; } group_size++; @@ -625,7 +625,7 @@ void usage(FILE *out) { fprintf(out, " -h, --help show this help\n"); fprintf(out, " -d, --ignore-dots ignore dot files and directories\n"); fprintf(out, " -0, --ignore-empty ignore empty files\n"); - fprintf(out, " -c, --hide-matchings do not show which files in DIR2 corresponds to\n"); + fprintf(out, " -c, --hide-matchings do not show which files in DIR2 correspond to\n"); fprintf(out, " those in DIR1\n"); fprintf(out, " -g, --no-group-ids do not show the file groups\n"); fprintf(out, " -t, --time-sort sort according to modification time in each group\n");