diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-13 13:44:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-13 13:44:09 +0000 |
commit | 375688cd33afbd009a010d53cabc85fb20c4b5d2 (patch) | |
tree | a599de319e59f009fb06861d04ab49881495043c /contrib | |
parent | 70076b2ebb592b46fc7b9de912d60e1560fcc0f8 (diff) | |
download | rspamd-375688cd33afbd009a010d53cabc85fb20c4b5d2.tar.gz rspamd-375688cd33afbd009a010d53cabc85fb20c4b5d2.zip |
[Minor] UCL: Save filename when setting file vars
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libucl/ucl_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/libucl/ucl_util.c b/contrib/libucl/ucl_util.c index 279e9f3c6..10e5df61f 100644 --- a/contrib/libucl/ucl_util.c +++ b/contrib/libucl/ucl_util.c @@ -1934,6 +1934,11 @@ ucl_parser_set_filevars (struct ucl_parser *parser, const char *filename, bool n ucl_parser_register_variable (parser, "FILENAME", realbuf); curdir = dirname (realbuf); ucl_parser_register_variable (parser, "CURDIR", curdir); + + if (parser->cur_file) { + free (parser->cur_file); + } + parser->cur_file = strdup (filename); } else { /* Set everything from the current dir */ |