From bfed2e1bf5cfb250e17e91566546b38b4b9a34d8 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 19 Mar 2024 15:39:41 +0000 Subject: Use paths relative to data/conf in the config file. This was done in some places already but not consistently. Closes #349. --- src/misc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index 861e6ee20..8a0920fc1 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -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; -- cgit