diff --git a/monitarr/monitarr/main.cpp b/monitarr/monitarr/main.cpp index dd035ee..767489b 100644 --- a/monitarr/monitarr/main.cpp +++ b/monitarr/monitarr/main.cpp @@ -47,6 +47,12 @@ using namespace monitarr; auto main(int argc, char **argv) -> int { MONITARR_USES_FUNCTION_NAME(); + if (not utils::file::change_to_process_directory()) { + utils::error::handle_error(function_name, + "failed to change to process directory"); + return 1; + } + #if defined(PROJECT_ENABLE_BACKWARD_CPP) static backward::SignalHandling sh; #endif // defined(PROJECT_ENABLE_BACKWARD_CPP)