Skip to content

Commit 70cdf67

Browse files
committed
Move StripRedundantLastElementsOfPath before ArgsManager class.
1 parent 0dd7b23 commit 70cdf67

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/util/system.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,19 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
235235
return true;
236236
}
237237

238+
namespace {
239+
fs::path StripRedundantLastElementsOfPath(const fs::path& path)
240+
{
241+
auto result = path;
242+
while (result.filename().string() == ".") {
243+
result = result.parent_path();
244+
}
245+
246+
assert(fs::equivalent(result, path));
247+
return result;
248+
}
249+
} // namespace
250+
238251
// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
239252
// #include class definitions for all members.
240253
// For example, m_settings has an internal dependency on univalue.
@@ -723,19 +736,6 @@ fs::path GetDefaultDataDir()
723736
#endif
724737
}
725738

726-
namespace {
727-
fs::path StripRedundantLastElementsOfPath(const fs::path& path)
728-
{
729-
auto result = path;
730-
while (result.filename().string() == ".") {
731-
result = result.parent_path();
732-
}
733-
734-
assert(fs::equivalent(result, path));
735-
return result;
736-
}
737-
} // namespace
738-
739739
static fs::path g_blocks_path_cache_net_specific;
740740
static fs::path pathCached;
741741
static fs::path pathCachedNetSpecific;

0 commit comments

Comments
 (0)