DCjanus commented on issue #2086:
URL: 
https://github.com/apache/incubator-opendal/issues/2086#issuecomment-1534613575

   For now, in S3 backend, `operator.create_dir("test/")` would create a empty 
object, with key `test/`. Which might cause a lot of problem.
   
   For example:
   
   ```
   use opendal::Operator;
   
   #[tokio::main]
   async fn main() -> anyhow::Result<()> {
       let mut builder = opendal::services::S3::default();
       builder.endpoint("http://localhost:9000";);
       builder.access_key_id("minioadmin");
       builder.secret_access_key("minioadmin");
       builder.region("us-east-1");
       builder.bucket("test");
       let operator = Operator::new(builder)?.finish();
       operator.create_dir("test/").await?;
       
       // List method required path ends with '/'.
       let mut lister = operator.list("test/").await?;
   
       // Given dir would not in the list.
       assert_eq!(lister.next_page().await?.unwrap().is_empty(), true);
       Ok(())
   }
   ```


-- 
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