Removing legacy path from nano::working_path as versions that use this path are no longer supported in the upgrade path. (#3414)

This commit is contained in:
clemahieu 2021-08-06 13:44:52 +01:00 committed by GitHub
commit 6410c5241a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 34 deletions

View file

@ -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 ());
@ -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;

View file

@ -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 ();