]> Kevux Git Server - kevux-tools/commit
Progress: Continue working on completing the remove program.
authorKevin Day <Kevin@kevux.org>
Fri, 25 Apr 2025 04:23:55 +0000 (23:23 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 25 Apr 2025 04:28:19 +0000 (23:28 -0500)
commit197ffd9719500e4a4cce44bd16c545ab7a8c48ca
tree48f1c6eaa3810418de63b773a986fd36ce25a981
parentaaf0aa4073cf10ffde2dfa67cf39c019f92f7deb
Progress: Continue working on completing the remove program.

Tweak the logic to ensure the simulate prints the simulate message only once for the top-most directory and then only for the second simulate pass (which is after the recursion into the directory children).

Make so the `--remember yes` works as intended.
Make the `--remember yes` the default for the `remove` program.
Print the "skip yes" when simulating and remember state causes a skip.

A unit test is failing due to a bug/regression in `kt_remove_operate_recurse_action()`.
I belive this line is the concern:
```
if (!(flag & f_directory_recurse_do_flag_action_d) || !kt_remove_operate_shall_remove(recurse->state.code) && !((main->setting.flag & kt_remove_main_flag_simulate_d) && !recurse->depth)) return;
```
This is not yet addressed.
28 files changed:
sources/c/program/kevux/tools/remove/main/common/define.h
sources/c/program/kevux/tools/remove/main/common/string.c
sources/c/program/kevux/tools/remove/main/common/string.h
sources/c/program/kevux/tools/remove/main/operate.c
sources/c/program/kevux/tools/remove/main/operate.h
sources/c/program/kevux/tools/remove/main/preprocess.c
sources/c/program/kevux/tools/remove/main/preprocess.h
sources/c/program/kevux/tools/remove/main/print/simulate.c
sources/c/program/kevux/tools/remove/main/print/simulate.h
sources/c/program/kevux/tools/remove/remove/main.c
sources/c/program/kevux/tools/remove/rm/main.c
sources/c/program/kevux/tools/remove/rmdir/main.c
sources/c/program/kevux/tools/remove/unlink/main.c
tests/unit/remove/c/main-test-remove.c
tests/unit/remove/c/test-remove-date_accessed.c
tests/unit/remove/c/test-remove-date_changed.c
tests/unit/remove/c/test-remove-date_updated.c
tests/unit/remove/c/test-remove-directory_no_args.c
tests/unit/remove/c/test-remove-directory_recurse_simple.c
tests/unit/remove/c/test-remove-directory_tree_simple.c
tests/unit/remove/c/test-remove-epochtime.c
tests/unit/remove/c/test-remove-file_mode.c
tests/unit/remove/c/test-remove-file_type.c
tests/unit/remove/c/test-remove-group.c
tests/unit/remove/c/test-remove-regular_no_args.c
tests/unit/remove/c/test-remove-time.c
tests/unit/remove/c/test-remove-unix.c
tests/unit/remove/c/test-remove-user.c