You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/03/26 15:19:07 UTC

(opendal) branch main updated: fix(correctness check): add missing conditional write capability check (#7320)

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 8232a8d6e fix(correctness check): add missing conditional write capability check (#7320)
8232a8d6e is described below

commit 8232a8d6ee279f26b1e8c4ee61171f9599a6fcf0
Author: dentiny <de...@gmail.com>
AuthorDate: Thu Mar 26 08:19:01 2026 -0700

    fix(correctness check): add missing conditional write capability check (#7320)
---
 core/core/src/layers/correctness_check.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/core/core/src/layers/correctness_check.rs b/core/core/src/layers/correctness_check.rs
index 38e211def..9ed9845e9 100644
--- a/core/core/src/layers/correctness_check.rs
+++ b/core/core/src/layers/correctness_check.rs
@@ -147,6 +147,13 @@ impl<A: Access> LayeredAccess for CorrectnessAccessor<A> {
                 "if_not_exists",
             ));
         }
+        if args.if_match().is_some() && !capability.write_with_if_match {
+            return Err(new_unsupported_error(
+                &self.info,
+                Operation::Write,
+                "if_match",
+            ));
+        }
         if let Some(if_none_match) = args.if_none_match() {
             if !capability.write_with_if_none_match {
                 let mut err =