Fixed the version number.
[dus.git] / dus.c
diff --git a/dus.c b/dus.c
index 08cd183..63cc183 100644 (file)
--- 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");