uavcan_dynamic_node_id_server - posfixing the storage path with self node ID

This commit is contained in:
Pavel Kirienko
2015-05-23 21:35:12 +03:00
parent 9b5074051f
commit aaa3c225c4
@@ -603,7 +603,7 @@ int main(int argc, const char** argv)
{
try
{
const auto options = parseOptions(argc, argv);
auto options = parseOptions(argc, argv);
std::cout << "Self node ID: " << int(options.node_id.get()) << "\n"
"Cluster size: " << int(options.cluster_size) << "\n"
@@ -619,6 +619,8 @@ int main(int argc, const char** argv)
/*
* Preparing the storage directory
*/
options.storage_path += "/node_" + std::to_string(options.node_id.get());
(void)std::system(("mkdir -p '" + options.storage_path + "' &>/dev/null").c_str());
const auto event_log_file = options.storage_path + "/events.log";