]> Kevux Git Server - fll/commitdiff
Update: add support for file error F_file_type_not_directory.
authorKevin Day <thekevinday@gmail.com>
Mon, 30 Nov 2020 03:43:52 +0000 (21:43 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 30 Nov 2020 03:43:52 +0000 (21:43 -0600)
level_2/fll_error/c/error.c

index fd426fd5d8ca37072ec891abfbf07666d209503f..6aeadf4b828bc775e6a267544a59cb89cfebaf1f 100644 (file)
@@ -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) {