From: Kevin Day Date: Mon, 30 Nov 2020 03:43:52 +0000 (-0600) Subject: Update: add support for file error F_file_type_not_directory. X-Git-Tag: 0.5.2~52 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=4feb1291336dcd7b9773e2c24bab9903f2c7c59f;p=fll Update: add support for file error F_file_type_not_directory. --- 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) {