]> Kevux Git Server - fll/commit
Bugfix: Problems in f_file functions exposed by unit tests.
authorKevin Day <thekevinday@gmail.com>
Mon, 18 Apr 2022 03:41:05 +0000 (22:41 -0500)
committerKevin Day <thekevinday@gmail.com>
Mon, 18 Apr 2022 03:41:05 +0000 (22:41 -0500)
commitf8ee296930f2d758bd4557536053894555596f3f
treeaffb51e9b10fa73fcbbc0089e6b9d5502234cc00
parent90106d3a3c46871acc5cca463cf6a440e619a69c
Bugfix: Problems in f_file functions exposed by unit tests.

Clean up f_file_name_base() and f_file_name_directory() code.

Use f_string_ascii_period_s rather than f_string_ascii_plus_s to match a period!
Perform this comparison check after allocating the necessary space to ensure a NULL terminated string is returned.

The POSIX standard designates that read() returns 0 on EOF.
Rather than checking for size_read == file.size_read (and similar), check fo size_read to be 0.

When total is 0, return F_data_not for f_file_read_until().
level_0/f_file/c/file.c
level_0/f_file/c/file.h