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 125ca7ff9 fix(dav-server): Fix create_dir to create nested directories 
(#6321)
125ca7ff9 is described below

commit 125ca7ff9d1aff81fe2a8e606249b789c6b96e10
Author: sqlpxc <[email protected]>
AuthorDate: Wed Jun 25 11:19:58 2025 +0800

    fix(dav-server): Fix create_dir to create nested directories (#6321)
---
 integrations/dav-server/src/fs.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/integrations/dav-server/src/fs.rs 
b/integrations/dav-server/src/fs.rs
index 49dc3a086..3316d4a3f 100644
--- a/integrations/dav-server/src/fs.rs
+++ b/integrations/dav-server/src/fs.rs
@@ -125,7 +125,11 @@ impl DavFileSystem for OpendalFs {
             // During MKCOL processing, a server MUST make the Request-URI a 
member of its parent collection, unless the Request-URI is "/".  If no such 
ancestor exists, the method MUST fail.
             // refer to 
https://datatracker.ietf.org/doc/html/rfc2518#section-8.3.1
             let parent = Path::new(&path).parent().unwrap();
-            match self.op.exists(parent.to_str().unwrap()).await {
+            match self
+                .op
+                .exists(format!("{}/", parent.display()).as_str())
+                .await
+            {
                 Ok(exist) => {
                     if !exist && parent != Path::new("/") {
                         return Err(FsError::NotFound);

Reply via email to