1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 21:56:38 +02:00

Use paths relative to data/conf in the config file.

This was done in some places already but not consistently.

Closes #349.
This commit is contained in:
Sadie Powell
2024-03-19 15:39:41 +00:00
parent e488f294a1
commit bfed2e1bf5
8 changed files with 32 additions and 23 deletions
+4 -1
View File
@@ -810,8 +810,11 @@ void Anope::UpdateTime()
#endif
}
Anope::string Anope::Expand(const Anope::string& base, const Anope::string& fragment)
Anope::string Anope::Expand(const Anope::string &base, const Anope::string &fragment)
{
if (fragment.empty())
return ""; // We can't expand an empty fragment.
// The fragment is an absolute path, don't modify it.
if (std::filesystem::path(fragment.str()).is_absolute())
return fragment;