aboutsummaryrefslogtreecommitdiff
path: root/src/modulemanager.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-15 22:45:11 +0000
committerGravatar Sadie Powell2022-01-15 23:20:45 +0000
commit9059147974ffbe2bea55b9c2136307a77f465835 (patch)
treedd5e8a4a0634d4a9afbf14813c8779f7839f99f5 /src/modulemanager.cpp
parentMerge branch 'insp3' into master. (diff)
Replace uses of the FileSystem class with std::filesystem.
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r--src/modulemanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index a600ed8ad..8d99a5aef 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -40,7 +40,8 @@ bool ModuleManager::Load(const std::string& modname, bool defer)
const std::string filename = ExpandModName(modname);
const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename);
- if (!FileSystem::FileExists(moduleFile))
+ std::error_code ec;
+ if (!std::filesystem::is_regular_file(moduleFile, ec))
{
LastModuleError = "Module file could not be found: " + filename;
ServerInstance->Logs.Log("MODULE", LOG_DEFAULT, LastModuleError);