]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Really fix the issue
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 27 Oct 2023 07:20:48 +0000 (08:20 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 27 Oct 2023 07:20:48 +0000 (08:20 +0100)
src/libserver/hyperscan_tools.cxx

index f7bd78a9b684e6fb03e35254cab35b368707ef5c..4bcc68e4a767811f8c924e91513654d357cf8816 100644 (file)
@@ -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;