Skip to content

Commit

Permalink
util: Drop no longer needed StripRedundantLastElementsOfPath() function
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Feb 9, 2022
1 parent ecd094e commit ebda2b8
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/util/system.cpp
Expand Up @@ -245,19 +245,6 @@ static std::optional<util::SettingsValue> InterpretValue(const KeyInfo& key, con
return value;
}

namespace {
fs::path StripRedundantLastElementsOfPath(const fs::path& path)
{
auto result = path;
while (result.filename().empty() || fs::PathToString(result.filename()) == ".") {
result = result.parent_path();
}

assert(fs::equivalent(result, path.lexically_normal()));
return result;
}
} // namespace

// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
// #include class definitions for all members.
// For example, m_settings has an internal dependency on univalue.
Expand Down Expand Up @@ -462,7 +449,6 @@ const fs::path& ArgsManager::GetDataDir(bool net_specific) const
}
}

path = StripRedundantLastElementsOfPath(path);
return path;
}

Expand Down

0 comments on commit ebda2b8

Please sign in to comment.