We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4bccaa + c6da7bc commit fde0a78Copy full SHA for fde0a78
src/output-flex.cpp
@@ -36,6 +36,8 @@ extern "C"
36
#include <rapidjson/stringbuffer.h>
37
#include <rapidjson/writer.h>
38
39
+#include <boost/filesystem.hpp>
40
+
41
#include <cassert>
42
#include <cstdlib>
43
#include <cstring>
@@ -1630,6 +1632,10 @@ void output_flex_t::init_lua(std::string const &filename)
1630
1632
m_options.append ? "append" : "create");
1631
1633
luaX_add_table_int(lua_state(), "stage", 1);
1634
1635
+ std::string const dir_path =
1636
+ boost::filesystem::path{filename}.parent_path().string();
1637
+ luaX_add_table_str(lua_state(), "config_dir", dir_path.c_str());
1638
1639
luaX_add_table_func(lua_state(), "define_table",
1640
lua_trampoline_app_define_table);
1641
0 commit comments