From: Kevin Day Date: Mon, 20 Jan 2025 03:24:00 +0000 (-0600) Subject: Update: use directory back and current strings. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=b43bef0b885ebc28318d06f3acf08698fdc2a671;p=fll Update: use directory back and current strings. These should be used rather than the inline strings. --- diff --git a/build/stand_alone/fake.config.h b/build/stand_alone/fake.config.h index c8d3981..a2cda19 100644 --- a/build/stand_alone/fake.config.h +++ b/build/stand_alone/fake.config.h @@ -301,10 +301,10 @@ #define _di_f_date_simple_t_ #define _di_f_date_t_ //#define _di_f_directory_at_d_ -#define _di_f_directory_back_s_ +//#define _di_f_directory_back_s_ //#define _di_f_directory_create_ #define _di_f_directory_create_at_ -#define _di_f_directory_current_s_ +//#define _di_f_directory_current_s_ //#define _di_f_directory_exists_ #define _di_f_directory_exists_at_ //#define _di_f_directory_flag_d_ @@ -335,7 +335,7 @@ #define _di_f_directory_recurse_doss_t_ //#define _di_f_directory_remove_ //#define _di_f_directory_remove_custom_ -#define _di_f_directory_s_ +//#define _di_f_directory_s_ #define _di_f_directory_status_delete_ #define _di_f_directory_status_destroy_ //#define _di_f_directory_status_t_ diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index 27ca561..bfea735 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -300,7 +300,7 @@ extern "C" { name_directory.used = strnlen(name_directory.string, F_directory_max_name_d); // There is no reason to include "." and ".." in the directory listing. - if (!strncmp(name_directory.string, "..", 3) || !strncmp(name_directory.string, ".", 2)) { + if (!strncmp(name_directory.string, f_directory_current_s.string, f_directory_current_s.used + 1) || !strncmp(name_directory.string, f_directory_back_s.string, f_directory_back_s.used + 1)) { f_memory_resize(1, 0, sizeof(f_char_t), (void **) & entity[i]); continue;