martinzink commented on code in PR #1993: URL: https://github.com/apache/nifi-minifi-cpp/pull/1993#discussion_r2298229057
########## core-framework/include/Defaults.h: ########## Review Comment: 👍 good idea, https://github.com/apache/nifi-minifi-cpp/pull/1993/commits/5d36afd3fe7234320bd4614ef079f3ab3dc2e735#diff-7d86e7b872fe352fbd2ecac07636274a36488edb36e9916d823d8dad018f1e98R20-R21 ########## core-framework/include/Defaults.h: ########## @@ -23,3 +23,6 @@ const std::filesystem::path DEFAULT_NIFI_PROPERTIES_FILE = std::filesystem::path const std::filesystem::path DEFAULT_LOG_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-log.properties"; const std::filesystem::path DEFAULT_UID_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-uid.properties"; const std::filesystem::path DEFAULT_BOOTSTRAP_FILE = std::filesystem::path("conf") / "bootstrap.conf"; + +constexpr std::string_view MINIFI_HOME_ENV_KEY = "MINIFI_HOME"; +constexpr std::string_view MINIFI_HOME_ENV_VALUE_FHS = "FHS"; Review Comment: https://github.com/apache/nifi-minifi-cpp/pull/1993/commits/5d36afd3fe7234320bd4614ef079f3ab3dc2e735#diff-7d86e7b872fe352fbd2ecac07636274a36488edb36e9916d823d8dad018f1e98R23-R31 ########## libminifi/src/core/repository/FileSystemRepository.cpp: ########## @@ -29,7 +29,7 @@ bool FileSystemRepository::initialize(const std::shared_ptr<Configure>& configur if (std::string directory_str; configuration->get(Configure::nifi_dbcontent_repository_directory_default, directory_str) && !directory_str.empty()) { directory_ = directory_str; } else { - directory_ = configuration->getHome().string(); + directory_ = std::filesystem::current_path().string(); Review Comment: you are right, 👍 https://github.com/apache/nifi-minifi-cpp/pull/1993/commits/5d36afd3fe7234320bd4614ef079f3ab3dc2e735#diff-d9b4aa782d762debb02c7e36f3a4303662c6e17b4f8fdd0a28f9c76ae72faf96R35 ########## minifi_main/MainHelper.h: ########## Review Comment: good idea 👍 , https://github.com/apache/nifi-minifi-cpp/pull/1993/commits/5d36afd3fe7234320bd4614ef079f3ab3dc2e735#diff-8e10ec79071fe6ce56fe1de81816e96365e9be4f61741a975a0902eb60d7724bR49 ########## libminifi/src/utils/file/AssetManager.cpp: ########## @@ -16,18 +16,27 @@ */ #include "utils/file/AssetManager.h" -#include "utils/file/FileUtils.h" + +#include "core/logging/LoggerFactory.h" #include "rapidjson/document.h" #include "rapidjson/writer.h" -#include "core/logging/LoggerFactory.h" #include "utils/Hash.h" +#include "utils/Locations.h" +#include "utils/file/FileUtils.h" #undef GetObject // windows.h #defines GetObject = GetObjectA or GetObjectW, which conflicts with rapidjson namespace org::apache::nifi::minifi::utils::file { +std::filesystem::path getRootFromConfigure(const Configure& configuration) { Review Comment: good idea, https://github.com/apache/nifi-minifi-cpp/pull/1993/commits/5d36afd3fe7234320bd4614ef079f3ab3dc2e735 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
