diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-19 15:10:25 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-19 15:11:40 +0000 |
commit | fde3438ef29447f41a6eb48049f8d620c1c2eb30 (patch) | |
tree | fcd2f03a9d5b693106ab545d3ffd08934149aee2 /src/config.cpp | |
parent | 1575dea5b96e7249d94ebc9214a73d123919c4ba (diff) |
Allow using absolute paths in more places.
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.cpp b/src/config.cpp index 6a8380464..7b322f8c9 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -697,7 +697,7 @@ const Anope::string &File::GetName() const Anope::string File::GetPath() const { - return (this->executable ? "" : Anope::ConfigDir + "/") + this->name; + return this->executable ? this->name : Anope::ExpandConfig(this->name); } bool File::IsOpen() const @@ -708,7 +708,7 @@ bool File::IsOpen() const bool File::Open() { this->Close(); - this->fp = (this->executable ? popen(this->name.c_str(), "r") : fopen((Anope::ConfigDir + "/" + this->name).c_str(), "r")); + this->fp = (this->executable ? popen(GetPath().c_str(), "r") : fopen(GetPath().c_str(), "r")); return this->fp != NULL; } |