szaszm commented on code in PR #1409:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1409#discussion_r958286353


##########
minifi_main/MainHelper.cpp:
##########
@@ -146,9 +146,9 @@ std::string determineMinifiHome(const 
std::shared_ptr<logging::Logger>& logger)
   } else {
     logger->log_info("%s is not a valid " MINIFI_HOME_ENV_KEY ", because there 
is no " DEFAULT_NIFI_PROPERTIES_FILE " file in it.", minifiHome);
 
-    std::string minifiHomeWithoutBin;
-    std::string binDir;
-    std::tie(minifiHomeWithoutBin, binDir) = 
minifi::utils::file::split_path(minifiHome);
+    const std::filesystem::path path{minifiHome};
+    std::string minifiHomeWithoutBin = path.parent_path().string();
+    std::string binDir = path.filename().string();

Review Comment:
   MINIFI_HOME is not supposed to contain bin. Would you mind renaming 
`minifiHome` to `minifiBinDir` or something similar, to avoid confusion?



-- 
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]

Reply via email to