From: Kevin Day Date: Tue, 15 Feb 2022 18:09:42 +0000 (-0600) Subject: Bugfix: Do not validate directory existence when cleaning. X-Git-Tag: 0.5.8~48 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=93b676eaed35219a763e443b72daa25cae0565cf;p=fll Bugfix: Do not validate directory existence when cleaning. Do not call the directory validation existence check before cleaning. Also treat F_directory as not an error when cleaning. Remove unnecessary signal check. Output to warning stream instead of normal output stream when displaying warning. --- diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index f3a33de..d32016f 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -309,7 +309,6 @@ extern "C" { } else if (main->operation == fake_operation_clean_e) { if (validate_parameter_directories) { - status = fake_validate_parameter_directories(main); validate_parameter_directories = F_false; } diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index 1e44e11..b03359c 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -13,8 +13,6 @@ extern "C" { #ifndef _di_fake_clean_operate_ f_status_t fake_clean_operate(fake_main_t * const main) { - f_status_t status = F_none; - if (main->output.verbosity != f_console_verbosity_quiet_e) { flockfile(main->output.to.stream); @@ -25,9 +23,7 @@ extern "C" { funlockfile(main->output.to.stream); } - if (fake_signal_received(main)) { - return F_status_set_error(F_interrupt); - } + f_status_t status = F_none; if (main->error.verbosity == f_console_verbosity_verbose_e) { status = f_directory_remove_custom(main->path_build, F_directory_descriptors_max_d, F_true, fake_clean_remove_recursively_verbosely); @@ -36,15 +32,15 @@ extern "C" { status = f_directory_remove(main->path_build, F_directory_descriptors_max_d, F_true); } - if (F_status_set_fine(status) == F_file_found_not) { + if (F_status_set_fine(status) == F_file_found_not || F_status_set_fine(status) == F_directory) { if (main->error.verbosity == f_console_verbosity_verbose_e) { - flockfile(main->output.to.stream); + flockfile(main->warning.to.stream); - f_print_terminated("The build directory '", main->output.to.stream); - fl_print_format("%[%Q%]", main->output.to.stream, main->context.set.notable, main->path_build, main->context.set.notable); - fl_print_format("' does not exist.%r", main->output.to.stream, f_string_eol_s); + f_print_terminated("The build directory '", main->warning.to.stream); + fl_print_format("%[%Q%]", main->warning.to.stream, main->context.set.notable, main->path_build, main->context.set.notable); + fl_print_format("' does not exist.%r", main->warning.to.stream, f_string_eol_s); - funlockfile(main->output.to.stream); + funlockfile(main->warning.to.stream); } status = F_none;