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/modules/m_xline_db.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/m_xline_db.cpp') diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 6df8036f1..83d1a7bd2 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -27,9 +27,11 @@ */ +#include +#include + #include "inspircd.h" #include "xline.h" -#include class ModuleXLineDB final : public Module @@ -169,7 +171,8 @@ class ModuleXLineDB final bool ReadDatabase() { // If the xline database doesn't exist then we don't need to load it. - if (!FileSystem::FileExists(xlinedbpath)) + std::error_code ec; + if (!std::filesystem::is_regular_file(xlinedbpath, ec)) return true; std::ifstream stream(xlinedbpath); -- cgit v1.3.1-10-gc9f91