]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix log message
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 1 Jul 2023 19:02:35 +0000 (20:02 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 1 Jul 2023 19:02:35 +0000 (20:02 +0100)
src/libutil/cxx/file_util.cxx

index 31768337057f6a83abdaef2be3cf1eb672418aaf..bc9028aa8a15e34e082fa3e6b5bb2d6ea685917c 100644 (file)
@@ -58,7 +58,7 @@ auto raii_file::create(const char *fname, int flags, int perms) -> tl::expected<
 #endif
 
        if (fname == nullptr) {
-               return tl::make_unexpected(error {"cannot open file; filename is nullptr", EINVAL, error_category::CRITICAL});
+               return tl::make_unexpected(error {"cannot create file; filename is nullptr", EINVAL, error_category::CRITICAL});
        }
 
        auto fd = ::open(fname, oflags, perms);
@@ -239,7 +239,7 @@ auto raii_file_sink::create(const char *fname, int flags, int perms,
                                                        const char *suffix) -> tl::expected<raii_file_sink, error>
 {
        if (!fname || !suffix) {
-               return tl::make_unexpected(error {"cannot open file; filename is nullptr", EINVAL, error_category::CRITICAL});
+               return tl::make_unexpected(error {"cannot create file; filename is nullptr", EINVAL, error_category::CRITICAL});
        }
 
        auto tmp_fname = fmt::format("{}.{}", fname, suffix);