From 4feb1291336dcd7b9773e2c24bab9903f2c7c59f Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 29 Nov 2020 21:43:52 -0600 Subject: [PATCH] Update: add support for file error F_file_type_not_directory. --- level_2/fll_error/c/error.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index fd426fd..6aeadf4 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -215,6 +215,19 @@ extern "C" { return F_false; } + if (type == fll_error_file_type_file) { + if (status == F_file_type_not_directory) { + if (error.verbosity != f_console_verbosity_quiet) { + fprintf(error.to.stream, "%c", f_string_eol[0]); + fprintf(error.to.stream, "%s%sInvalid or missing directory in path while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : "", operation, type_name); + fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string); + fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]); + } + + return F_false; + } + } + if (type == fll_error_file_type_file || type == fll_error_file_type_directory) { if (status == F_directory_found_not) { if (error.verbosity != f_console_verbosity_quiet) { -- 1.8.3.1