Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: config path location for win
  • Loading branch information
PawelKorsak committed Mar 24, 2026
commit 08ebb61939cdbbf93330be4c529171e39c6d0099
9 changes: 5 additions & 4 deletions candletool/src/md_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,10 @@ namespace mab
}
// If the path is not specified, prepend the standard path
if (std::find(configFilePath.begin(), configFilePath.end(), '/') ==
configFilePath.end())
configFilePath.end() || std::find(configFilePath.begin(), configFilePath.end(), '\\') ==
configFilePath.end())
{
configFilePath = "/etc/candletool/config/motors/" + configFilePath;
configFilePath = std::string(DEFAULT_CANDLETOOL_CONFIG_DIR) + "/config/motors/" + configFilePath;
}

MDConfigMap cfgMap;
Expand Down Expand Up @@ -532,7 +533,7 @@ namespace mab
auto md = getMd(mdCanId, candleBuilder);
if (md == nullptr)
{
m_logger.error("Coudl not connect to MD!");
m_logger.error("Could not connect to MD!");
return;
}

Expand All @@ -546,7 +547,7 @@ namespace mab
if (std::find(configFilePath.begin(), configFilePath.end(), '/') ==
configFilePath.end())
{
configFilePath = "/etc/candletool/config/motors/" + configFilePath;
configFilePath = std::string(DEFAULT_CANDLETOOL_CONFIG_DIR) + "/config/motors/" + configFilePath;
}

mINI::INIFile configFile(configFilePath);
Expand Down