From ba19b1cfbe6de7c440263d223aefd750ae725556 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 29 May 2023 18:22:57 -0500 Subject: [PATCH] Bugfix: Handle f_directory_not status as an invalid directory. The status f_directory_not is returned with the path exists but is not a directory. The fake program can fail when doing something like this: fake clean make -w /arbitrary_non_directory_file +V The error message returned is not very helpful: ERROR: (674) when calling function f_file_stat(). This is a known file-related error and so it is now handled appropraitely. The new error message looks like: ERROR: Invalid directory while trying to access directory '/arbitrary_non_directory_file'. --- level_2/fll_error/c/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index 00b69f8..61b8772 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -72,7 +72,7 @@ extern "C" { return F_false; } - if (status == F_directory) { + if (status == F_directory || status == F_directory_not) { if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); -- 1.8.3.1