From: John Beppu Date: Thu, 16 Dec 1999 21:16:47 +0000 (-0000) Subject: killed an elusive bug in du -s. X-Git-Tag: 0_40~45 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0aa611816772021e706f0996aa2eed56d26ad696;p=oweals%2Fbusybox.git killed an elusive bug in du -s. --- diff --git a/coreutils/du.c b/coreutils/du.c index e5788c63d..ed90bc445 100644 --- a/coreutils/du.c +++ b/coreutils/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 $ */ diff --git a/du.c b/du.c index e5788c63d..ed90bc445 100644 --- 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 $ */