]> Kevux Git Server - fll/commitdiff
Bugfix: Improve Controller error message regarding "file not found..., found".
authorKevin Day <Kevin@kevux.org>
Thu, 11 Jul 2024 02:40:57 +0000 (21:40 -0500)
committerKevin Day <Kevin@kevux.org>
Thu, 11 Jul 2024 02:40:57 +0000 (21:40 -0500)
The error message essentially says file not found because file was found.
This is crazy confusing.

Fix the error message to say something more like unable to create the file because an existing file is found.

level_2/fll_error/c/error.c
level_3/controller/c/rule/private-rule.c

index 61b877233f93d06533696141e0c2c1e0a16ae2af..36ed4ccc987cba6e72455a3a813e2474a354f193 100644 (file)
@@ -232,7 +232,7 @@ extern "C" {
 
         fl_print_format("%r%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
         fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
-        fl_print_format("%[', found.%]%r", print.to.stream, print.context, print.context, f_string_eol_s);
+        fl_print_format("%[', found existing %Q.%]%r", print.to.stream, print.context, print.context, type_name, f_string_eol_s);
 
         funlockfile(print.to.stream);
       }
index 3ecc7f1adce8d1d6a9d1666fe1328286be78b4d6..99d50b948038aaedf2442361123a3967bbfe6238 100644 (file)
@@ -1662,7 +1662,7 @@ extern "C" {
     }
 
     if (status == F_true) {
-      controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e);
+      controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_create_s, fll_error_file_type_file_e);
 
       return F_status_set_error(F_file_found);
     }