X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=dus.c;h=63cc183c30acadfd523cd1002953f6c7621b128b;hb=e708ca19d1b2345e001050b327ffbbbf5e09e88c;hp=08cd183929d49efbf0f51cbf3513857f61efb9da;hpb=eca27b58c4fbc0a771edf635ccc726eb89699589;p=dus.git diff --git a/dus.c b/dus.c index 08cd183..63cc183 100644 --- a/dus.c +++ b/dus.c @@ -85,7 +85,7 @@ int ignore_entry(const char *name) { return strcmp(name, ".") == 0 || strcmp(name, "..") == 0 || - (ignore_dotfiles && name[0] == '.'); + (ignore_dotfiles && name[0] == '.' && name[1] != '/'); } size_sum_t entry_size(const char *name) { @@ -204,7 +204,8 @@ int compare_files(const void *x1, const void *x2) { } } -void raw_print(char *buffer, size_t buffer_size, char *filename, size_sum_t size) { +void raw_print(char *buffer, size_t buffer_size, + char *filename, size_sum_t size) { char *a, *b, *c, u; b = buffer; @@ -337,7 +338,7 @@ void print_sorted(struct entry_node *root, int width, int height) { void usage(FILE *out) { fprintf(out, "Usage: dus [OPTION]... [FILE]...\n"); fprintf(out, "Version %s (%s)\n", VERSION_NUMBER, UNAME); - fprintf(out, "List files and directories sorted according to their size or content size. Take the content of the current directory as argument if none is provided.\n"); + fprintf(out, "List files and directories sorted according to their sizes. If no files or directories are provided as arguments, use the content of the current directory.\n"); fprintf(out, "\n"); /* 01234567890123456789012345678901234567890123456789012345678901234567890123456789*/ fprintf(out, " -d, --ignore-dots ignore files and directories starting with a '.'\n");