killed an elusive bug in du -s.
authorJohn Beppu <beppu@lbox.org>
Thu, 16 Dec 1999 21:16:47 +0000 (21:16 -0000)
committerJohn Beppu <beppu@lbox.org>
Thu, 16 Dec 1999 21:16:47 +0000 (21:16 -0000)
coreutils/du.c
du.c

index e5788c63d4a64383d54853ef208283bdc369cde6..ed90bc445dc45b1fa7bea6c45791033a267d5898 100644 (file)
@@ -136,11 +136,11 @@ du_main(int argc, char **argv)
        int sum;
        for ( ; i < argc; i++) {
            sum = du(argv[i]);
-           if (sum) { print_normal(sum, argv[i]); }
+           if ((sum) && (isDirectory(argv[i]))) { print_normal(sum, argv[i]); }
        }
     }
 
     exit(0);
 }
 
-/* $Id: du.c,v 1.6 1999/12/15 18:52:17 beppu Exp $ */
+/* $Id: du.c,v 1.7 1999/12/16 21:16:47 beppu Exp $ */
diff --git a/du.c b/du.c
index e5788c63d4a64383d54853ef208283bdc369cde6..ed90bc445dc45b1fa7bea6c45791033a267d5898 100644 (file)
--- a/du.c
+++ b/du.c
@@ -136,11 +136,11 @@ du_main(int argc, char **argv)
        int sum;
        for ( ; i < argc; i++) {
            sum = du(argv[i]);
-           if (sum) { print_normal(sum, argv[i]); }
+           if ((sum) && (isDirectory(argv[i]))) { print_normal(sum, argv[i]); }
        }
     }
 
     exit(0);
 }
 
-/* $Id: du.c,v 1.6 1999/12/15 18:52:17 beppu Exp $ */
+/* $Id: du.c,v 1.7 1999/12/16 21:16:47 beppu Exp $ */