From: Kevin Day Date: Mon, 29 May 2023 23:26:57 +0000 (-0500) Subject: Bugfix: Handle f_directory_not status as an invalid directory. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=074dcf9a0dc2f0c9d432caee9fcb5566db000ba6;p=fll 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'. --- diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index 6b4f775..aefe468 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -78,7 +78,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);