Skip to content

Commit

Permalink
VFIL_searchpath: Do not call back unless file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nigoroll committed Oct 12, 2017
1 parent d130e22 commit 8e9eb0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/libvarnish/vfil.c
Expand Up @@ -390,6 +390,8 @@ VFIL_searchpath(const struct vfil_path *vp, vfil_path_func_f *func, void *priv,
VSB_clear(vsb);
VSB_printf(vsb, "%s/%s", vd->dir, fni);
AZ(VSB_finish(vsb));
if (access(VSB_data(vsb), F_OK))
continue;
i = func(priv, VSB_data(vsb));
if (i <= 0) {
e = errno;
Expand Down

0 comments on commit 8e9eb0f

Please sign in to comment.