Test the full path instead of just the filename provided in the
rule to see if it exists.
Fixes the case where a rule file is loaded from a directory
other than the default-rule-directory.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3916
if (snprintf(path, sizeof(path), "%s/%s", dir, load) >= (int)sizeof(path)) // TODO windows path
return -1;
- if (SCPathExists(load)) {
+ if (SCPathExists(path)) {
done = true;
strlcpy(load, path, load_size);
SCLogDebug("using path '%s' (HAVE_LIBGEN_H)", load);