aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.config/read.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.config/read.cc')
-rw-r--r--nihil.config/read.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/nihil.config/read.cc b/nihil.config/read.cc
index 3c20566..0a5fcad 100644
--- a/nihil.config/read.cc
+++ b/nihil.config/read.cc
@@ -4,6 +4,7 @@
module;
+#include <coroutine>
#include <expected>
#include <filesystem>
#include <format>
@@ -27,7 +28,7 @@ auto read_from(std::filesystem::path const &filename)
if (!err) {
// Ignore ENOENT, it simply means we haven't created the
// config file yet, so default values will be used.
- if (err.error() == std::errc::no_such_file_or_directory)
+ if (err.error().root_cause() == std::errc::no_such_file_or_directory)
return {};
auto errstr = std::format("cannot read {}", filename.string());
return std::unexpected(nihil::error(errstr, err.error()));