commit ae8621d: [Minor] Really fix the issue

Vsevolod Stakhov vsevolod at rspamd.com
Fri Oct 27 07:28:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-10-27 08:20:48 +0100
URL: https://github.com/rspamd/rspamd/commit/ae8621d2fbfe77e60320324fe35c9542ff31c459 (HEAD -> master)

[Minor] Really fix the issue

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

diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx
index f7bd78a9b..4bcc68e4a 100644
--- a/src/libserver/hyperscan_tools.cxx
+++ b/src/libserver/hyperscan_tools.cxx
@@ -147,7 +147,7 @@ public:
 
 		fpath = std::filesystem::canonical(fpath, ec);
 
-		if (!ec && ec.value() != 0) {
+		if (ec && ec.value() != 0) {
 			msg_err_hyperscan("invalid path: \"%s\", error message: %s", fname, ec.message().c_str());
 			return;
 		}
@@ -177,7 +177,7 @@ public:
 
 		fpath = std::filesystem::canonical(fpath, ec);
 
-		if (!ec && ec.value() != 0) {
+		if (ec && ec.value() != 0) {
 			msg_err_hyperscan("invalid path to remove: \"%s\", error message: %s",
 							  fname, ec.message().c_str());
 			return;


More information about the Commits mailing list