Add a check to make sure the user-defined logpath is correctly
appended with the '/' character, which is needed for the
correct creation of directories.
This is redundant, we can just append our "/" and be done with it.
From the POSIX-Standard 1 we can see under "General Concepts" ->
"Pathname Resolution" that,
If a pathname begins with two successive characters,
the first component following the leading characters
may be interpreted in an implementation-defined manner,
although more than two leading characters shall be
treated as a single character.
+
if (*path != '/') {
pr_error(
"Please provide an absolute path for log filepath\n");
Panagiotis Foliadis @.***> writes:
This is redundant, we can just append our "/" and be done with it.
From the POSIX-Standard 1 we can see under "General Concepts" -> "Pathname Resolution" that, If a pathname begins with two successive characters,
the first component following the leading characters
may be interpreted in an implementation-defined manner,
although more than two leading characters shall be
treated as a single character.