[PATCH v4] tree: new applet
rknecht at pm.me
rknecht at pm.me
Mon May 2 20:48:01 UTC 2022
> Hi,
> if (dirent->d_name[0] != '.') {
>
> > + if (strncmp(dirent->d_name, ".", 1) != 0) {
>
>
> twisted logic?
Will fix
>
> > + is_file = !is_directory(dirent->d_name, 1);
>
>
> is_not_last is used only once
Will fix
> Less lines maybe less size (untested)
>
> if (is_directory(dirent->d_name, 1)) {
>
> globals.directories++;
> tree_print(dirent->d_name, &child_directory);
>
> } else {
> globals.files++;
> printf((symlink) ? "%s -> %s\n" : "%s\n", dirent->d_name, symlink_path);
>
> }
> free(symlink_path);
This changes the output and fails the tests.
Thanks,
Roger
More information about the busybox
mailing list