diff --git a/src/config_format/flb_cf_yaml.c b/src/config_format/flb_cf_yaml.c index 6e64915a553..916093368d9 100644 --- a/src/config_format/flb_cf_yaml.c +++ b/src/config_format/flb_cf_yaml.c @@ -537,8 +537,10 @@ static char *dirname(char *path) ptr = strrchr(path, '\\'); if (ptr == NULL) { - return path; + /* No directory component */ + return "."; } + *ptr++='\0'; return path; }