Skip to content

Commit

Permalink
squash. More path-related questions.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Oct 16, 2024
1 parent ecc2404 commit 4f9e4a2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
5 changes: 5 additions & 0 deletions lib/core/include/irods/irods_load_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ namespace irods

fs::path plugin_home;

// TODO The directory used to resolve plugins is already configurable via
// the irods_environment.json file. This is very weird for server-side code
// because this override is comes from a client-side config file.
//
// TODO Lean on ::ProcessType for determining which location to load plugins from?
rodsEnv env;
int status = getRodsEnv( &env );
if ( !status ) {
Expand Down
2 changes: 0 additions & 2 deletions lib/core/src/irods_environment_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ namespace irods {
// that
std::string json_file;
try {
// TODO What does the server need that lives under the home directory?
// What does the client need that lives under the home directory?
json_file = get_irods_home_directory().string();
} catch (const irods::exception& e) {
irods::log(e);
Expand Down
29 changes: 13 additions & 16 deletions lib/core/src/irods_get_full_path_for_config_file.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
// =-=-=-=-=-=-=-
// boost includes
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>

// =-=-=-=-=-=-=-
// stl includes
#include <vector>

// =-=-=-=-=-=-=-
// irods includes
#include "irods/rodsErrorTable.h"
#include "irods/irods_log.hpp"
#include "irods/irods_get_full_path_for_config_file.hpp"
#include "irods/irods_default_paths.hpp"
#include "irods/irods_exception.hpp"

namespace irods {
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>

#include <vector>

namespace irods
{
error get_full_path_for_config_file(
const std::string& _cfg_file,
std::string& _full_path ) {
Expand All @@ -27,6 +22,7 @@ namespace irods {
path.append(_cfg_file);
if ( fs::exists(path) ) {
_full_path = path.string();
// TODO What should the log category be for this?
rodsLog( LOG_DEBUG, "config file found [%s]", _full_path.c_str() );
return SUCCESS();
}
Expand All @@ -38,7 +34,7 @@ namespace irods {
std::string msg( "config file not found [" );
msg += _cfg_file + "]";
return ERROR(SYS_INVALID_INPUT_PARAM, msg);
}
} // get_full_path_for_config_file

error get_full_path_for_unmoved_configs(
const std::string& _cfg_file,
Expand All @@ -50,6 +46,7 @@ namespace irods {
path.append("config").append(_cfg_file);
if ( fs::exists(path) ) {
_full_path = path.string();
// TODO What should the log category be for this?
rodsLog( LOG_DEBUG, "config file found [%s]", _full_path.c_str() );
return SUCCESS();
}
Expand All @@ -61,5 +58,5 @@ namespace irods {
std::string msg( "config file not found [" );
msg += _cfg_file + "]";
return ERROR(SYS_INVALID_INPUT_PARAM, msg);
}
}
} // get_full_path_for_unmoved_configs
} // namespace irods
1 change: 1 addition & 0 deletions lib/core/src/osauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ extern "C" {
return USER__NULL_INPUT_ERR;
}

// TODO Is osauth.cpp needed/used by anything?
boost::filesystem::path default_os_auth_keyfile_path = irods::get_irods_config_directory();
default_os_auth_keyfile_path.append(OS_AUTH_KEYFILE);
std::string default_os_auth_keyfile_path_string = default_os_auth_keyfile_path.string();
Expand Down

0 comments on commit 4f9e4a2

Please sign in to comment.