diff options
| author | 2022-01-15 22:45:11 +0000 | |
|---|---|---|
| committer | 2022-01-15 23:20:45 +0000 | |
| commit | 9059147974ffbe2bea55b9c2136307a77f465835 (patch) | |
| tree | dd5e8a4a0634d4a9afbf14813c8779f7839f99f5 /src/modules/m_xline_db.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Replace uses of the FileSystem class with std::filesystem.
Diffstat (limited to 'src/modules/m_xline_db.cpp')
| -rw-r--r-- | src/modules/m_xline_db.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 <filesystem> +#include <fstream> + #include "inspircd.h" #include "xline.h" -#include <fstream> 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); |
