We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c2fedd commit b51c577Copy full SHA for b51c577
core/services/seafile/src/lister.rs
@@ -56,9 +56,11 @@ impl oio::PageList for SeafileLister {
56
);
57
58
let entry = if info.type_field == "file" {
59
- let meta = Metadata::new(EntryMode::FILE)
60
- .with_last_modified(Timestamp::from_second(info.mtime)?)
61
- .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 {
62
+ meta.set_content_length(size);
63
+ }
64
Entry::new(&rel_path, meta)
65
} else {
66
let path = format!("{rel_path}/");
0 commit comments