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

junouyang pushed a commit to branch feat/blocking-operator-api-sync
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit 6e9042653f5167523c150043ec57db840af88612
Author: owl <[email protected]>
AuthorDate: Thu Aug 24 17:05:58 2023 +0800

    fix(response): fix code
---
 core/src/types/operator/blocking_operator.rs | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/core/src/types/operator/blocking_operator.rs 
b/core/src/types/operator/blocking_operator.rs
index 442368dc5..e5c4ce98a 100644
--- a/core/src/types/operator/blocking_operator.rs
+++ b/core/src/types/operator/blocking_operator.rs
@@ -593,19 +593,7 @@ impl BlockingOperator {
     /// # }
     /// ```
     pub fn writer(&self, path: &str) -> Result<BlockingWriter> {
-        let path = normalize_path(path);
-
-        if !validate_path(&path, EntryMode::FILE) {
-            return Err(
-                Error::new(ErrorKind::IsADirectory, "write path is a 
directory")
-                    .with_operation("BlockingOperator::writer")
-                    .with_context("service", 
self.info().scheme().into_static())
-                    .with_context("path", &path),
-            );
-        }
-
-        let op = OpWrite::default();
-        BlockingWriter::create(self.inner().clone(), &path, op)
+        self.writer_with(path).call()
     }
 
     /// Create a new reader with extra options

Reply via email to