diff options
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 */ |