You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2026/02/23 13:37:57 UTC

[PR] fix(services/azfile): avoid defaulting list size to zero [opendal]

Xuanwo opened a new pull request, #7220:
URL: https://github.com/apache/opendal/pull/7220

   # Which issue does this PR close?
   
   Part of #7062.
   
   # Rationale for this change
   
   `azfile` lister currently treats missing `Content-Length` in list response as `0`.
   This conflates "unknown size" with "real zero-byte file", which breaks the mandatory list content-length semantics introduced in core.
   
   # What changes are included in this PR?
   
   - Update `core/services/azfile/src/lister.rs`:
     - Stop using `unwrap_or(0)` for file `content_length`.
     - Set `content_length` only when the service response includes `Content-Length`.
   
   This keeps real zero-byte files correct while allowing core fallback completion logic to handle missing sizes safely.
   
   Validation:
   
   - `cargo fmt`
   - `cargo check --features services-azfile,tests`
   - `cargo test -p opendal-service-azfile`
   
   # Are there any user-facing changes?
   
   Yes.
   
   For `azfile`, list entries no longer report `content_length = 0` when Azure File list response omits content length.
   
   # AI Usage Statement
   
   This PR was developed with Codex (GPT-5) assistance.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(services/azfile): avoid defaulting list size to zero [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #7220:
URL: https://github.com/apache/opendal/pull/7220


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org