Skip to content

Commit f546280

Browse files
SwooshyCuebalanking
authored andcommitted
[#141] Use irods::get_irods_config_directory()
1 parent bbda117 commit f546280

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#pragma GCC diagnostic pop
2424

2525
#include <irods/rodsErrorTable.h>
26+
#include <irods/irods_default_paths.hpp>
2627
#include <irods/irods_error.hpp>
2728
#include <irods/irods_re_plugin.hpp>
2829
#include <irods/irods_re_structs.hpp>
@@ -339,10 +340,7 @@ irods::error start(irods::default_re_ctx&, const std::string& _instance_name)
339340
#endif
340341
Py_InitializeEx(0);
341342
std::lock_guard<std::recursive_mutex> lock{python_mutex};
342-
boost::filesystem::path full_path(boost::filesystem::current_path());
343-
boost::filesystem::path etc_irods_path = full_path.parent_path().parent_path();
344-
etc_irods_path /= "etc";
345-
etc_irods_path /= "irods";
343+
boost::filesystem::path etc_irods_path = irods::get_irods_config_directory();
346344
std::string exec_str = "import sys\nsys.path.append('" + etc_irods_path.generic_string() + "')";
347345

348346
bp::object main_module = bp::import("__main__");

0 commit comments

Comments
 (0)