Skip to content

Commit

Permalink
Make ct happy again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peguen committed Jan 20, 2025
1 parent 2fbbdf2 commit 4effd46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ecal/core/src/config/ecal_path_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ namespace eCAL
return {};
}

bool DirManager::canWriteToDirectory(const std::string& dirPath) const
bool DirManager::canWriteToDirectory(const std::string& path_) const
{
std::string testFilePath = dirPath + "/test_file.txt";
const std::string testFilePath = path_ + "/test_file.txt";
std::ofstream testFile(testFilePath);

if (testFile)
Expand All @@ -251,7 +251,7 @@ namespace eCAL
// returns the directory path of the specified file
std::string DirManager::getDirectoryPath(const std::string& file_path_) const
{
size_t pos = file_path_.find_last_of("/\\");
const size_t pos = file_path_.find_last_of("/\\");
return (std::string::npos == pos) ? "" : file_path_.substr(0, pos);
}

Expand Down Expand Up @@ -339,7 +339,7 @@ namespace eCAL
{
std::string GeteCALLogDirImpl(const Util::IDirProvider& dir_provider_ /* = Util::DirProvider() */, const Util::IDirManager& dir_manager_ /* = Util::DirManager() */, const eCAL::Configuration& config_ /* = eCAL::GetConfiguration() */)
{
std::string config_file_dir = dir_manager_.getDirectoryPath(eCAL::GetConfiguration().GetConfigurationFilePath());
const std::string config_file_dir = dir_manager_.getDirectoryPath(eCAL::GetConfiguration().GetConfigurationFilePath());

const std::vector<std::string> log_paths = {
dir_provider_.eCALEnvVar(ECAL_LOG_VAR),
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/config/ecal_path_processing.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace eCAL
virtual bool dirExistsOrCreate(const std::string& path_) const = 0;
virtual bool createEcalDirStructure(const std::string& path_) const = 0;
virtual bool canWriteToDirectory(const std::string& path_) const = 0;
virtual std::string getDirectoryPath(const std::string& filePath) const = 0;
virtual std::string getDirectoryPath(const std::string& file_path_) const = 0;

virtual std::string findFileInPaths(const std::vector<std::string>& paths_, const std::string& file_name_) const = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/logging/ecal_log_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ namespace eCAL
log_path.pop_back();

const std::string file_name = tstring + "_" + m_attributes.unit_name + "_" + std::to_string(m_attributes.process_id) + ".log";
std::vector<std::string> file_path_components = { log_path, file_name };
const std::vector<std::string> file_path_components = { log_path, file_name };

m_logfile_name = EcalUtils::String::Join(std::string(1, EcalUtils::Filesystem::NativeSeparator()), file_path_components);
m_logfile = fopen(m_logfile_name.c_str(), "w");
Expand Down

0 comments on commit 4effd46

Please sign in to comment.