This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new b51c5777c fix(services/seafile): avoid defaulting list size to zero 
(#7221)
b51c5777c is described below

commit b51c5777c93b3ffd5800fd7aebdfcede7236f71d
Author: Xuanwo <[email protected]>
AuthorDate: Tue Feb 24 11:36:11 2026 +0800

    fix(services/seafile): avoid defaulting list size to zero (#7221)
---
 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}/");

Reply via email to