Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config] Small hotfix for path_processing and logging to file #1917

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Peguen
Copy link
Contributor

@Peguen Peguen commented Jan 17, 2025

Description

Logging to file expected a path separator at the end of the path. This now will be checked beforehand and handled accordingly.

GeteCALLogDirImpl used to check the local user and system path separately. Now its connected to the yaml file path. In case no LOG_VAR, DATA_VAR or config path is set, it tries to log to the folder where the ecal configuration yaml was loaded from.

@Peguen Peguen requested a review from KerstinKeller January 17, 2025 15:19
@Peguen Peguen added the cherry-pick-to-NONE Don't cherry-pick these changes label Jan 17, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

ecal/core/src/config/ecal_path_processing.cpp Outdated Show resolved Hide resolved
ecal/core/src/config/ecal_path_processing.cpp Outdated Show resolved Hide resolved
ecal/core/src/config/ecal_path_processing.cpp Outdated Show resolved Hide resolved
ecal/core/src/config/ecal_path_processing.h Show resolved Hide resolved
ecal/core/src/logging/ecal_log_provider.cpp Outdated Show resolved Hide resolved
{
return false;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure if this is the best way to check if you have write access to a directory.
What happens if you can't delete the file anymore?
I would guess that there are system functions that can check write access to a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants