fadflka opened a new issue, #7102:
URL: https://github.com/apache/opendal/issues/7102

   ### Describe the bug
   
   ## Describe the bug
   
   When using the Onedrive service to list the root directory (`"/"`), the 
`list()` method returns an empty vector, even though files exist in the root 
directory and `read()` works correctly.
   
   ## Steps to reproduce
   
   ```rust
   use opendal::{Result, Operator};
   
   #[tokio::main]
   async fn main() -> Result<()> {
       let mut builder = opendal::services::Onedrive::default();
       builder = builder.access_token("<valid_access_token>");
       builder = builder.client_id("<client_id>");
       builder = builder.client_secret("<client_secret>");
       let op = Operator::new(builder)?.finish();
   
       // This returns empty []
       let entries = op.list("/").await?;
       println!("entries: {:?}", entries.len()); // Output: 0
   
       // But reading a file that exists works fine
       let content = op.read("/6g.txt").await?;
       println!("read success, {} bytes", content.len()); // Output: 5869 bytes
   
       Ok(())
   }
   ```
   
   ### Steps to Reproduce
   
   ```rust
    let mut builder = opendal::services::Onedrive::default();
       builder = builder.access_token("<valid_access_token>");
       builder = builder.client_id("<client_id>");
       builder = builder.client_secret("<client_secret>");
       let op = Operator::new(builder)?.finish();
   
       // This returns empty []
       let entries = op.list("/").await?;
       println!("entries: {:?}", entries.len()); // Output: 0
   ```
   
   ### Expected Behavior
   
   op.list("/") should return the list of files and directories in the OneDrive 
root folder.
   
   ### Additional Context
   
   _No response_
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [ ] Yes, I would like to submit a PR.


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