Mola-maker opened a new pull request, #9088:
URL: https://github.com/apache/opendal/pull/9088

   # Which issue does this PR close?
   
   Closes #9087.
   
   # Rationale for this change
   
   When the backend has no `last_modified`, `OpendalMetadata::modified` returns 
an error. libunftp then writes `--- -- --:--` in the LIST line, which 
`ls`-style parsers cannot read. OpenDAL's own `ftp` service takes the whole 
line as the entry name, and it cannot stat directories created on 
`services::Memory`.
   
   # What changes are included in this PR?
   
   - `modified()` now returns `UNIX_EPOCH` when the backend has no 
`last_modified`. This matches the object_store integration's documented default.
   - Add a unit test.
   
   Trade-off: `modified()` also feeds `MDTM` and the `modify` fact of 
`MLST`/`MLSD`. For entries without a modification time, these used to return an 
error or omit the fact. They now report 1970-01-01. On `services::Memory` this 
mostly affects directories, because files written there have a modification 
time. Fixing this only in LIST would need a parseable placeholder in libunftp's 
shared formatter.
   
   Verification (Windows 11, rustc 1.99.1):
   
   - The new test fails on main and passes with this change.
   - `cargo test --no-fail-fast` in `integrations/unftp-sbe`: lib 3, 
`storage_backend` 23 and `ftp_loopback` 5 passed. The one other failure, 
`ftp_loopback::parent_traversal_delete_errors_and_dir_rename`, fails the same 
way on main on Windows.
   - `cargo clippy --all-targets -- -D warnings`: clean on Windows.
   - End to end with OpenDAL's `ftp` service against this server on Memory: 
`stat("d/")` now returns `DIR` and `list("/")` returns `d/`. The ftp behavior 
suite went from 63 to 68 passed. The remaining failures are writes, which need 
rename, and Memory does not support rename.
   
   # Are there any user-facing changes?
   
   Entries without a modification time are listed, and reported by MDTM and 
MLST, with the Unix epoch instead of an unparseable placeholder or an error.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Claude Code
   - Model: Anthropic Claude
   - Effort: default
   - Role: Found the bug by running OpenDAL's `ftp` service against OpenDAL's 
`unftp-sbe` server on Memory, wrote the fix and the test, and ran the checks 
above. A separate review pass checked every libunftp caller of `modified()` and 
the MDTM/MLST trade-off.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to