Xuanwo opened a new pull request, #7221:
URL: https://github.com/apache/opendal/pull/7221
# Which issue does this PR close?
Part of #7062.
# Rationale for this change
`seafile` lister currently maps missing `size` in list response to `0`.
This mixes "size is unknown in list response" with "real zero-byte file",
which is semantically incorrect.
# What changes are included in this PR?
- Update `core/services/seafile/src/lister.rs`:
- Remove `unwrap_or(0)` when setting file `content_length`.
- Set `content_length` only when `info.size` exists.
This preserves correct zero-byte semantics while allowing core completion
logic to fill missing sizes when needed.
Validation:
- `cargo fmt`
- `cargo check --features services-seafile,tests`
- `cargo test -p opendal-service-seafile`
# Are there any user-facing changes?
Yes.
For `seafile`, list entries no longer report `content_length = 0` when list
response omits `size`.
# 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]