aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-04 19:02:18 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-09 19:33:24 +0200
commitebda2b8c819d989327c6b3e29237dfb43628e647 (patch)
treec6d0ad8089d2447f09e58b06acfab9ca350eaeca /src/util/system.cpp
parentecd094e2b1e1eb7dba24dafef3640a9b6cc55f82 (diff)
downloadbitcoin-ebda2b8c819d989327c6b3e29237dfb43628e647.tar.xz
util: Drop no longer needed StripRedundantLastElementsOfPath() function
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index c5130dc684..64d8ef38f0 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -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.
@@ -462,7 +449,6 @@ const fs::path& ArgsManager::GetDataDir(bool net_specific) const
}
}
- path = StripRedundantLastElementsOfPath(path);
return path;
}