[BusyBox] du bug!

Erik Andersen andersen at lineo.com
Sat Dec 9 17:06:08 UTC 2000


On Thu Dec 07, 2000 at 07:43:46PM -0800, kent robotti wrote:
> 
> 
> This returns nothing with
> du from the latest cvs bb.
> 
> # du file_that_exist

Fixed now in CVS...

$ ./busybox du find.c
4       find.c

It was an easy one line fix fortunately...

diff -u -b -B -w -p -r1.29 du.c
--- du.c        2000/12/07 19:56:48     1.29
+++ du.c        2000/12/09 17:05:21
@@ -156,7 +156,7 @@ int du_main(int argc, char **argv)
                for (i=optind; i < argc; i++) {
                        if ((sum = du(argv[i])) == 0)
                                status = EXIT_FAILURE;
-                       if (sum && is_directory(argv[i], FALSE, NULL)) {
+                       if (is_directory(argv[i], FALSE, NULL)==FALSE) {
                                print_normal(sum, argv[i]);
                        }
                        reset_ino_dev_hashtable();

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list