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 ef35d31dc fix(services/azfile): avoid defaulting list size to zero
(#7220)
ef35d31dc is described below
commit ef35d31dc046a9317121b972ecc7032a540f528e
Author: Xuanwo <[email protected]>
AuthorDate: Tue Feb 24 12:13:17 2026 +0800
fix(services/azfile): avoid defaulting list size to zero (#7220)
---
core/services/azfile/src/lister.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/services/azfile/src/lister.rs
b/core/services/azfile/src/lister.rs
index 289db82b9..d5d6ed6d0 100644
--- a/core/services/azfile/src/lister.rs
+++ b/core/services/azfile/src/lister.rs
@@ -74,10 +74,12 @@ impl oio::PageList for AzfileLister {
}
for file in results.entries.file {
- let meta = Metadata::new(EntryMode::FILE)
+ let mut meta = Metadata::new(EntryMode::FILE)
.with_etag(file.properties.etag)
-
.with_content_length(file.properties.content_length.unwrap_or(0))
.with_last_modified(Timestamp::parse_rfc2822(&file.properties.last_modified)?);
+ if let Some(size) = file.properties.content_length {
+ meta.set_content_length(size);
+ }
let path = self.path.clone().trim_start_matches('/').to_string() +
&file.name;
ctx.entries.push_back(oio::Entry::new(&path, meta));
}