From f7ffafc70a52b322c748e1cebb1dc434306aa951 Mon Sep 17 00:00:00 2001 From: murf Date: Wed, 24 Oct 2007 13:21:29 +0000 Subject: closes issue #11005, where #include uses the current dir instead of the config dir (/etc/asterisk) for relative path includes for AEL git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86967 f38db490-d61c-443f-a65b-d21fe96a405b --- res/ael/ael.flex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'res/ael/ael.flex') diff --git a/res/ael/ael.flex b/res/ael/ael.flex index 46c1d84aa..5adaff1eb 100644 --- a/res/ael/ael.flex +++ b/res/ael/ael.flex @@ -406,7 +406,11 @@ includes { STORE_POS; return KW_INCLUDES;} } else { strncpy(fnamebuf, p1+1, p2-p1-1); fnamebuf[p2-p1-1] = 0; - + if (fnamebuf[0] != '/') { + char fnamebuf2[1024]; + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } #ifdef SOLARIS glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); #else -- cgit v1.2.3