From 074dcf9a0dc2f0c9d432caee9fcb5566db000ba6 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 29 May 2023 18:26: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 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); -- 1.8.3.1