From 10acea08998440498d458b7d057953c542cc0155 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 9 Dec 2010 20:55:49 +0200 Subject: [PATCH] Add QUVI_SHOW_SCRIPT --- lib/lua_wrap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/lua_wrap.c b/lib/lua_wrap.c index 40602b3..08d8eaa 100644 --- a/lib/lua_wrap.c +++ b/lib/lua_wrap.c @@ -174,7 +174,7 @@ typedef int (*filter_func) (const struct dirent *); static QUVIcode scan_dir(llst_node_t * dst, const char *path, filter_func filter) { - char *show_scandir; + char *show_scandir, *show_script; struct dirent *de; DIR *dir; @@ -183,6 +183,7 @@ scan_dir(llst_node_t * dst, const char *path, filter_func filter) return (QUVI_OK); show_scandir = getenv("QUVI_SHOW_SCANDIR"); + show_script = getenv("QUVI_SHOW_SCRIPT"); if (show_scandir) fprintf(stderr, "%s: %s\n", __PRETTY_FUNCTION__, path); @@ -201,6 +202,9 @@ scan_dir(llst_node_t * dst, const char *path, filter_func filter) asprintf((char **)&qls->basename, "%s", de->d_name); asprintf((char **)&qls->path, "%s/%s", path, de->d_name); + if (show_script) + fprintf(stderr, "%s: %s\n", __PRETTY_FUNCTION__, qls->path); + llst_add(dst, qls); } } -- 2.11.4.GIT