Skip to content

Commit ebda2b8

Browse files
committed
util: Drop no longer needed StripRedundantLastElementsOfPath() function
1 parent ecd094e commit ebda2b8

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/util/system.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,6 @@ static std::optional<util::SettingsValue> InterpretValue(const KeyInfo& key, con
245245
return value;
246246
}
247247

248-
namespace {
249-
fs::path StripRedundantLastElementsOfPath(const fs::path& path)
250-
{
251-
auto result = path;
252-
while (result.filename().empty() || fs::PathToString(result.filename()) == ".") {
253-
result = result.parent_path();
254-
}
255-
256-
assert(fs::equivalent(result, path.lexically_normal()));
257-
return result;
258-
}
259-
} // namespace
260-
261248
// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
262249
// #include class definitions for all members.
263250
// For example, m_settings has an internal dependency on univalue.
@@ -462,7 +449,6 @@ const fs::path& ArgsManager::GetDataDir(bool net_specific) const
462449
}
463450
}
464451

465-
path = StripRedundantLastElementsOfPath(path);
466452
return path;
467453
}
468454

0 commit comments

Comments
 (0)