Skip to content

Commit

Permalink
Removing legacy path from nano::working_path as versions that use thi…
Browse files Browse the repository at this point in the history
…s path are no longer supported in the upgrade path. (#3414)
  • Loading branch information
clemahieu committed Aug 6, 2021
1 parent 298d38c commit 6410c52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
38 changes: 5 additions & 33 deletions nano/secure/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

static std::vector<boost::filesystem::path> all_unique_paths;

boost::filesystem::path nano::working_path (bool legacy)
boost::filesystem::path nano::working_path ()
{
static nano::network_constants network_constants;
auto result (nano::app_path ());
Expand All @@ -16,44 +16,16 @@ boost::filesystem::path nano::working_path (bool legacy)
release_assert (false);
break;
case nano::networks::nano_dev_network:
if (!legacy)
{
result /= "NanoDev";
}
else
{
result /= "RaiBlocksDev";
}
result /= "NanoDev";
break;
case nano::networks::nano_beta_network:
if (!legacy)
{
result /= "NanoBeta";
}
else
{
result /= "RaiBlocksBeta";
}
result /= "NanoBeta";
break;
case nano::networks::nano_live_network:
if (!legacy)
{
result /= "Nano";
}
else
{
result /= "RaiBlocks";
}
result /= "Nano";
break;
case nano::networks::nano_test_network:
if (!legacy)
{
result /= "NanoTest";
}
else
{
result /= "RaiBlocksTest";
}
result /= "NanoTest";
break;
}
return result;
Expand Down
2 changes: 1 addition & 1 deletion nano/secure/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace nano
{
// OS-specific way of finding a path to a home directory.
boost::filesystem::path working_path (bool = false);
boost::filesystem::path working_path ();
// Get a unique path within the home directory, used for testing.
// Any directories created at this location will be removed when a test finishes.
boost::filesystem::path unique_path ();
Expand Down

0 comments on commit 6410c52

Please sign in to comment.