]> Kevux Git Server - fll/commitdiff
Bugfix: The f_file_is_at() function is not properly comparing the file type.
authorKevin Day <thekevinday@gmail.com>
Sat, 16 Apr 2022 02:19:38 +0000 (21:19 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 16 Apr 2022 02:19:38 +0000 (21:19 -0500)
The check should be checking against the passed file type.

This has been revealed by the unit tests that I am writing.

level_0/f_file/c/file.c

index 467ccb4dc346f4111f8211f57ecbaa92c11077c7..98de2d62e04735d3c6c38f02859285c03885b5a6 100644 (file)
@@ -513,7 +513,7 @@ extern "C" {
       return F_status_set_error(F_file_stat);
     }
 
-    if (stat_file.st_mode == (S_IFMT & S_IFDIR)) {
+    if (macro_f_file_type_get(stat_file.st_mode) == type) {
       return F_true;
     }