aboutsummaryrefslogtreecommitdiff
path: root/src/modulemanager.cpp
diff options
context:
space:
mode:
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);