[Home]

Summary:ASTERISK-10550: glob #include uses base path different from non-glob #include
Reporter:Dmitry Andrianov (dimas)Labels:
Date Opened:2007-10-16 16:46:16Date Closed:2007-10-24 08:00:50
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_ael
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This works:
#include "ael/common/std.ael"

This does NOT work:
#include "ael/common/*.ael"

It produces: [Oct 17 06:03:38] WARNING[27976]: ael.flex:421 ael_yylex: Glob Expansion of pattern 'ael/common/*.ael' failed: No matches!

****** ADDITIONAL INFORMATION ******

Glob with full path (#include "/etc/asterisk/ael/common/*.ael") also works.

Probably the problem is the fact that when glob is used, base directory for relative path is the current directory while for non-glob #includes base dir is config dir. According to the fdocumentation: "If the path provided in quotes is a relative path, the parser looks in the config file directory for the file (usually /etc/asterisk)."
Comments:By: Steve Murphy (murf) 2007-10-24 07:57:40

You are completely correct. I overlooked this important little detail when I stole the globbing code from main/config.c and bent it to do my bidding.

I will close this bug via the commit template; I have updated my regressions, and made what I am pretty certain is the necessary fix to the code. If, however, I didn't get things right, please re-open this bug.

By: Digium Subversion (svnbot) 2007-10-24 08:00:50

Repository: asterisk
Revision: 86967

U   trunk/pbx/ael/ael-test/ref.ael-ntest22
U   trunk/pbx/ael/ael-test/ref.ael-test2
U   trunk/pbx/ael/ael-test/ref.ael-test3
U   trunk/pbx/ael/ael-test/ref.ael-test4
U   trunk/res/ael/ael.flex
U   trunk/res/ael/ael_lex.c

------------------------------------------------------------------------
r86967 | murf | 2007-10-24 08:00:49 -0500 (Wed, 24 Oct 2007) | 1 line

closes issue ASTERISK-10550, where #include uses the current dir instead of the config dir (/etc/asterisk) for relative path includes for AEL
------------------------------------------------------------------------