[master] 8e9eb0f VFIL_searchpath: Do not call back unless file exists

Nils Goroll nils.goroll at uplex.de
Thu Oct 12 20:08:09 UTC 2017


commit 8e9eb0ffe3ddd595fc654d5c03fc6a5e0a0557f9
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Oct 12 21:40:23 2017 +0200

    VFIL_searchpath: Do not call back unless file exists

diff --git a/lib/libvarnish/vfil.c b/lib/libvarnish/vfil.c
index 64f3c56..345096a 100644
--- a/lib/libvarnish/vfil.c
+++ b/lib/libvarnish/vfil.c
@@ -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;


More information about the varnish-commit mailing list