-
Notifications
You must be signed in to change notification settings - Fork 710
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
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
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: 0Expected 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working