This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 61d347da72b447c96bc4fcb0b8925f1cf5e4d8a4
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Fri Apr 25 17:02:56 2025 +0200

    MINIFICPP-2562 Readd setting current working directory at startup
    
    Previously removed in 14096e2879b26feabd54fe7e1118e613b79cf9ed which causes 
issues with relative paths set in minifi.properties.
    
    Closes #1962
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 minifi_main/MiNiFiMain.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/minifi_main/MiNiFiMain.cpp b/minifi_main/MiNiFiMain.cpp
index 61d49a7bc..facde3b03 100644
--- a/minifi_main/MiNiFiMain.cpp
+++ b/minifi_main/MiNiFiMain.cpp
@@ -282,6 +282,7 @@ int main(int argc, char **argv) {
   }
   // chdir to MINIFI_HOME
   std::error_code current_path_error;
+  std::filesystem::current_path(minifiHome, current_path_error);
   if (current_path_error) {
     logger->log_error("Failed to change working directory to MINIFI_HOME 
({})", minifiHome);
     return -1;

Reply via email to