1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 04:43:13 +02:00

Use full path to file for conf.cpp file could not be opened error message

This commit is contained in:
Adam
2017-08-05 18:31:26 -04:00
parent 23e59d9f2c
commit 2ad76278dd
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -665,6 +665,11 @@ const Anope::string &File::GetName() const
return this->name;
}
Anope::string File::GetPath() const
{
return (this->executable ? "" : Anope::ConfigDir + "/") + this->name;
}
bool File::IsOpen() const
{
return this->fp != NULL;
@@ -722,14 +727,14 @@ void Conf::LoadConf(File &file)
return;
if (!file.Open())
throw ConfigException("File " + file.GetName() + " could not be opened.");
throw ConfigException("File " + file.GetPath() + " could not be opened.");
Anope::string itemname, wordbuffer;
std::stack<Block *> block_stack;
int linenumber = 0;
bool in_word = false, in_quote = false, in_comment = false;
Log(LOG_DEBUG) << "Start to read conf " << file.GetName();
Log(LOG_DEBUG) << "Start to read conf " << file.GetPath();
// Start reading characters...
while (!file.End())
{