From 9059147974ffbe2bea55b9c2136307a77f465835 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 15 Jan 2022 22:45:11 +0000 Subject: Replace uses of the FileSystem class with std::filesystem. --- src/modulemanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modulemanager.cpp') 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); -- cgit v1.3.1-10-gc9f91