commit c241116: [Minor] Fix log message

Vsevolod Stakhov vsevolod at rspamd.com
Sat Jul 1 19:07:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-07-01 20:02:35 +0100
URL: https://github.com/rspamd/rspamd/commit/c241116bcfed5715027826bd766ce501ccb4dfcb (HEAD -> master)

[Minor] Fix log message

---
 src/libutil/cxx/file_util.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libutil/cxx/file_util.cxx b/src/libutil/cxx/file_util.cxx
index 317683370..bc9028aa8 100644
--- a/src/libutil/cxx/file_util.cxx
+++ b/src/libutil/cxx/file_util.cxx
@@ -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);


More information about the Commits mailing list