fix: correct get server name method #1953
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This pull request includes several changes to the
HardwareService::Restart
function and thefile_manager_utils
utilities to improve the handling of executable paths. The most important changes include updating the method for obtaining the executable path, adding debug logging, and modifying theRestart
function to use the new utility methods.Improvements to executable path handling:
engine/utils/file_manager_utils.cc
: ReplacedGetExecutableFolderContainerPath
withGetExecutablePath
and added a new methodGetExecutableFolderContainerPath
that callsGetExecutablePath().parent_path()
. [1] [2] [3]Updates to
HardwareService::Restart
function:engine/services/hardware_service.cc
: Updated theexe
variable to usefile_manager_utils::Subtract(file_manager_utils::GetExecutablePath(), cortex_utils::GetCurrentPath())
instead ofcommands::GetCortexServerBinary()
.engine/services/hardware_service.cc
: Changed the conversion ofexe
to a wide string usingexe.wstring()
instead ofcortex::wc::Utf8ToWstring(exe)
.engine/services/hardware_service.cc
: Updated the server file path to useexe.string()
and added debug logging for the server file path.Header file updates:
engine/utils/file_manager_utils.h
: Added declaration for the newGetExecutablePath
method.Fixes Issues
Self Checklist