This repository was archived by the owner on Jul 4, 2025. It is now read-only.
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::Restartfunction and thefile_manager_utilsutilities 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 theRestartfunction to use the new utility methods.Improvements to executable path handling:
engine/utils/file_manager_utils.cc: ReplacedGetExecutableFolderContainerPathwithGetExecutablePathand added a new methodGetExecutableFolderContainerPaththat callsGetExecutablePath().parent_path(). [1] [2] [3]Updates to
HardwareService::Restartfunction:engine/services/hardware_service.cc: Updated theexevariable to usefile_manager_utils::Subtract(file_manager_utils::GetExecutablePath(), cortex_utils::GetCurrentPath())instead ofcommands::GetCortexServerBinary().engine/services/hardware_service.cc: Changed the conversion ofexeto 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 newGetExecutablePathmethod.Fixes Issues
Self Checklist