This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch xuanwo/seafile-list-content-length in repository https://gitbox.apache.org/repos/asf/opendal.git
commit 8451bcc231c8eea0a48d26cc4dfbd59a59143e71 Author: Xuanwo <[email protected]> AuthorDate: Mon Feb 23 21:38:38 2026 +0800 fix(services/seafile): avoid defaulting list size to zero --- core/services/seafile/src/lister.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/services/seafile/src/lister.rs b/core/services/seafile/src/lister.rs index 6f97ce176..ccacd18e7 100644 --- a/core/services/seafile/src/lister.rs +++ b/core/services/seafile/src/lister.rs @@ -56,9 +56,11 @@ impl oio::PageList for SeafileLister { ); let entry = if info.type_field == "file" { - let meta = Metadata::new(EntryMode::FILE) - .with_last_modified(Timestamp::from_second(info.mtime)?) - .with_content_length(info.size.unwrap_or(0)); + let mut meta = Metadata::new(EntryMode::FILE) + .with_last_modified(Timestamp::from_second(info.mtime)?); + if let Some(size) = info.size { + meta.set_content_length(size); + } Entry::new(&rel_path, meta) } else { let path = format!("{rel_path}/");
