Xuanwo commented on code in PR #3649:
URL: 
https://github.com/apache/incubator-opendal/pull/3649#discussion_r1401855197


##########
core/src/services/azfile/core.rs:
##########
@@ -413,15 +412,11 @@ impl AzfileCore {
     }
 
     pub async fn ensure_parent_dir_exists(&self, path: &str) -> Result<()> {
-        let mut dirs = VecDeque::default();
         // azure file service does not support recursive directory creation
         let mut p = path;
         while p != "/" {
             p = get_parent(p);
-            dirs.push_front(p);
-        }
-        for dir in dirs {
-            let resp = self.azfile_create_dir(dir).await?;
+            let resp = self.azfile_create_dir(p).await?;

Review Comment:
   This change seems wrong. 
   
   Given this case: `a/b/c`:
   
   - `create_dir("a/b/")` failed since `a/` doesn't exist.
   - `create_dir("a/")` succeed.
   - But write `a/b/c` still failed since `a/b/` doesn't exist.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to